×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Finding the control signal in a loop

Finding the control signal in a loop

Finding the control signal in a loop

(OP)
Hello. I'm sorry this post is so wordy, but I wanted to make sure I explained myself as well as I could.

I am trying to clear some of the cobwebs and re-learn some of the controls material from my school days. I'm using Octave to run step tests on systems.

So far, I've been able to plot the step response of a hypothetical DC motor:

P (plant): Angle/Voltage = 1/(s(s+1))

When I plot the step response, the angle increases in a straight line (after acceleration is done) as one would expect. So far so good.

I then put this transfer function in a closed loop with a controller:

C (controller): C = 1

The resulting closed loop transfer function is:

Angle/Reference = CP/(1 + CP)

I then ran a step test on this transfer function and the system is indeed stabilised. The system overshoots, but settles to the value. It looks like a standard second order system. Once again, so far so good.

Finally, I changed the controller to a parallel form PID.

C = 3 + s + 1/s

I then ran a step test on the new closed loop transfer function, and I got a better response. The PID is working. It's not optimised at all, but it's working none the less.

Now here is where I run into trouble. I want to plot the output signal from the controller. A controller is no good if the simulation is assuming you can send infinite voltage to the DC motor!

So I solved the transfer function for controller output:

Cout/Reference = C / (1 + CP)

However, when I run the step test on this transfer function, Octave gives me an error:

error: ss: dss2ss: descriptor matrice "e" singular

My guess is that it's because the transfer function has a higher order polynomial for the numerator than the denominator, but I don't know for sure. I've reached the limits of my memory.

When I did this sort of thing in school, I had access to Simulink. That was easy because I could just throw in an oscilloscope at the controller output and look at the result.

So, my question is, what approach should I take for plotting the controller output using Octave?

Thanks for any help!

RE: Finding the control signal in a loop

Everything above looks okay except the PID. The parallel form PID you've specified isn't something that can be implemented as it's non-causal. If you set it up as a ratio of polynomials, you have (s^2+3s+1)/s, and since the numerator is second-order and the denominator is first-order, it is non-causal, which leads to singularity as you suspected. Real PIDs will often have a high cutoff-frequency low-pass filter included for causality. Try a PID of the form (Kds^2+Kps+Ki)/[s(Kfs+1)], where Kf is a higher frequency than any of the zeros in the numerator (Kf=10 gives pretty good results with the PID you have above). Change C to (s^2+3s+1)/[s(10s+1)], form Tur=C/(1+CP), and get the step response of Tur. You're results should be okay.

xnuke
"Live and act within the limit of your knowledge and keep expanding it to the limit of your life." Ayn Rand, Atlas Shrugged.
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

RE: Finding the control signal in a loop

(OP)
Thank you for the helpful response! Although I don't remember all the details surrounding causality, linearity, time invariance, phase and gain margins, root locus analysis, etc, I do remember the overarching themes of the controls classes I took.

Your reply has given me enough info to move forward and continue my re-learning.

Thanks again!

RE: Finding the control signal in a loop

(OP)
Ok, so I got a chance to play around with adding the lowpass filter. I can now plot the controller output, which is great!

When you said "Kf=10 gives pretty good results with the PID you have above", did you mean Kf=0.1? At Kf=10 the cutoff is 0.1 [rads/s] which is pretty low. My system shows an unstable response at that value, but good performance at Kf = 0.1.

Thanks again for your help! Things are moving along now.

RE: Finding the control signal in a loop

Yes, I did mean 0.1. That was a transposition error on my part. I set the LPF pole at -10, which gives a Kf = 0.1. My mistake.

xnuke
"Live and act within the limit of your knowledge and keep expanding it to the limit of your life." Ayn Rand, Atlas Shrugged.
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

RE: Finding the control signal in a loop

(OP)
It's no problem at all. Luckily I do remember enough to have a certain amount of intuition about the topic!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close