Tunning values

Hello,
Have a question regarding control systems.
I recently converted several transfer functions from the s domain into
the z domain, generated a difference equation, and programmed. One was a lead/lag compensator and the others are filters. By the way, I used Tim's book and another he recommend on digital filters. Thanks it helped.
I compared frequency response plots and step response plots and they match. There was a small phase margin lag over 3 to 5Hz but I was expecting this because of the 50ms processing time.
Processing time for each test is about 50ms and the same time constants and gains configured in the analog system were also configured in the digital system. I did prewarp the critical frequency for one of the filters but not for the lead/lag compensators (two of them).
Question: Are there any recommendations out there that you guys can share in setting time constants in newly converted digital filters and compensators from the analog world? I am using the analog time constants and all appears to be working well, but is there a solid procedure or rule of thumb when doing so. Any recommendations, inlcuding web links, books, and etc. are appreciated.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jules wrote:
...

I know "phase lag". What is "phase margin lag"?

Lead-lag compensators are designed to cancel a zero with a superimposed pole. If you don't prewarp them, the pole will be in the wrong place.

Sloppy approximations with short delays often have better outcomes than exact solutions that take too long.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Ha, 'margin'. I was composing an e-mail before I stopped and worked on the post. I couldn't get the word 'safety margin' out of my head and maybe that's were it came. Don't know but thanks for pointing it out.
Jerry, and others, how do you prewarp lead/lag time constants. What equation do you use? The constants are in time, seconds, and not in Hz. Do I convert time to frequency first using the the following:
T = 1/f
so if time is 3 seconds for lead time constant then f = .333. Multiplying by 2pie i then get 2.09. Is this what I use for 'w' in the prewarp equation? Or am I lost?? Help.
By the way,when using the same analog and digital time constants, I compared the unit step response of the analog and digital systems and they are a match, calculated and measured. The measured frequency response plot is a match up to 5Hz and a similiar (but not equal) match up to 8Hz -- I atrribute the difference to the reduced number of processing inputs for the digital system. Any feedback is appreciated. I am just getting into controls systems and I am enjoying it.
Any feedback is appreciated.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jules wrote:
...

You're not lost at all. w = 2*pi*f = 2*pi/T

There are no frequencies above fs/2 in a sampled signal. Any frequencies higher than that that influenced the sampling will show up as low-frequency aliases. Your analog impulse and step responses probably include frequencies too high to be accurately reproduced at the sample rate you chose. That's acceptable.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Jerry,
I will post later this week the Lead/Lag difference equations from using the bilinear method. Maybe you can identify which variable needs to be prewarp.
With no prewarp the difference equation matches the output of text book lead lag compensators.
I'll post later this week to share and to learn.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jules wrote:
...

The bilinear transformation is quite non-linear with respect to frequency. The complete imaginary axis of the s plane is mapped onto the unit circle of the z plane once, with negative frequencies below the real axis and positive frequencies above. If radian frequency is w in the s plane and W in the z plane, then W = tan(w/2) defines the warping inherent in the BLT. Note that this is quite linear for small w/f(sample), but departs from a straight line significantly as w (or W) increases. If you don't observe this warping and w/f(sample) > ~.1, then you aren't doing a BLT correctly.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mar 16, 7:21 am, Jules wrote:

http://www.informatics.bangor.ac.uk/~dewi/modules/dcs/mpz.pdf . I like to use MZT or matched Z transforms and bilinear transforms for filters and z transform tables and state space for simulations. I don't know why anybody would design a lead/lag filter using bilinear transforms. MZTs don't add extra digital zeros. It will be interesting to see how you convert a lead/lag filter from the s domain to the z domain then a difference equation. Hint, if it isn't simple you are doing it wrong.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jules wrote:

My recommendation: If you can, plan on using tuning the system in the digital domain when you're done. All of the methods that you can use to go from the s domain to the z domain are approximations. They get better as the sampling rate goes up in comparison to the pole and zero locations of your filters, but they are still approximations.
If you start by performing a system identification step in the digital domain, then tune from that, your filters will be exact digital representations of the digital filters you're specifying. It's hard to go wrong with exactitude.
Note, however, that your system identification may _not_ be exact -- but then, _any_ system identification is going to be inexact, so that's life. For systems that aren't too slow, and aren't dominated by friction or backlash, I feel that doing a frequency sweep and performing your design in the frequency domain with Bode plots and Nyquist plots gives you a closer approximation than using an ARMA-style system identification to attempt to get a transfer function -- but other folks disagree with me, and will be coming out of the woodwork any time now to do so publicly...
--

Tim Wescott
Wescott Design Services
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.