Re: Controller design
- From: Tim Wescott <tim@xxxxxxxxxxxxxxxx>
- Date: Mon, 20 Aug 2007 15:21:03 -0500
On Sun, 19 Aug 2007 10:19:19 +0000, Marco Trapanese wrote:
Hi,
so I have the step response of a system. I measured the output when on
the input there was a step.
Plotting the curve I found it might be approximated by a transfer
function like this:
P(s) = kh * 1 / (1 + s*tau)
In other words, the plant is a first-order system, the time constant is
about 0.5 s.
The first question is: how to find kh?
The signal I acquired is the output of the 12 bit ADC (sampling time of
5 ms) and of course it is amplified by the front-end op-amps. If I draw
both the signal acquired and the calculated step response of the above
t.f. I get kh = 600 to make equal the two curves. But the calculated
step response use a unit step: in my system the 'unit' I used is the
maximum power delivered by the motors... I'm wondering how to determine
the value of this constant.
Once determined I want to design my controller. I don't ask for the
right one, rather if in this case I can follow what Tim Wescott wrote in
his great book ("Applied Control Theory for Embedded Systems").
Given the continuous step response in 's' domain -> transform it in the
time domain -> sample (@ 5 ms, the ADC sampling time) and convert to 'z'
domain -> P(z) is found dividing by z/(z-1). Can I?
Now I should be able to design the controller in the 'z' domain because
I provide it the plant "as seen" from the digital circuits.
The last question is scilab related. Written the plant transfer function
in 'z' domain (P) and the controller one (C), the system is composed of
the controller cascaded by the plant and a unit feedback line. How to
implement this in scilab without found by hand the closed-loop transfer
function? I ask this because I'd like to change the controller t.f.
on-the-fly to see the overall step response.
Thanks in advance,
Marco / iw2nzm
I should also mention that your design technique appears to have two
glaring omissions so far, both of which you may be considering on the side:
First, the technique of measuring a step response and fitting a curve to
it tends to depreciate any high-frequency effects of your plant. In some
cases this matters not at all, because you are limited in your ability to
push the system response very high. In other cases one's ability to
control a plant is largely limited by the presence of mechanical
resonances; these tend to get lost in the noise of a step-response plot,
yet can, along with higher-frequency phase lag, be the most significant
limitation to high performance servo systems.
Second, you are still engaged in linear design -- don't forget to take
your nonlinearities into account. You'll have actuator saturation if
nothing else, but you may also have friction (unless you use really good
bearings), backlash (if you have gears), and other effects. Even having
an assembly with loose bolts can provide enough complex and weird effects
to defy analysis or tuning, until some guy with gray hair comes by and
tells you to tighten everything up.
--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com
Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
.
- Follow-Ups:
- Re: Controller design
- From: Marco Trapanese
- Re: Controller design
- References:
- Controller design
- From: Marco Trapanese
- Controller design
- Prev by Date: Re: Step up converter again
- Next by Date: Re: Low Freq Roll-Off, How?
- Previous by thread: Re: Controller design
- Next by thread: Re: Controller design
- Index(es):
Relevant Pages
|