-
1
- #1
PNachtwey
Electrical
- Oct 9, 2004
- 776
System identification should be the first topic of a controls course. I have made it clear that without having a good open loop transfer function none of the cool tricks like pole placement or other ones you may think of are useless. I use to give people on sci.engr.control for tweaking gains and drinking coffee while waiting for the results when back in the 1990s I knew controller gains can be calculated IF one knows the open loop transfer function. System identification is not that hard. It can be done easily using a free control software package like Scilab.
The trick to system identification is to start with an open loop model that should approximate how the system will react to open loop control signals. The general type of system should be known. For instance whether the system is integrating ( type 1, position, tank lvel ) or non-integrating ( type 0, temperature or velocity ) and how many poles it has. Other variables that need to be determine are things like offset and dead time. Now a differential equation can be written for the system but the coefficients for the state variables, dead time, offset and gain are unknown. That's OK. The differential equation is the most important part of this phase.
The second part is to excite the open loop system by varying the control signal in a way that will provide the most information about gains and time constants etc. There is no best way to do this but in general changing the control signal between different level somewhat rapidly and recording the response works well. Some systems use square waves but that can be awfully harsh on the equipment. If you use square waves control signals while identifying a hydraulic system with a 50 ton coil of steel on if you will p!$$ people off. Sine waves and ramps will do if the system you are trying to identify doesn't respond that fast in the first place. The result of this phase is have a record of time, control signal and the feed back (PV)
The third part is to make a good guess for the variables that need to be identified and uses them to calculate the estimate response for the trial model. Usually the first estimated response is awful. One judges how awful the response is by using the sum of square error between the estimated response and the measured response. When I first tried this my software faulted because the sum of squared errors exceed the maximum value for a floating point value so be careful.
Next one needs a method of changing the values of the variables so that the sum of squared error is minimized. This may take many trials unless an algorithm like Levenberg-Marquardt or BFGS is used. There are a few different algorithms that can quickly find the values that will minimize the sum of square errors. I like two I mentioned. If the final sum of square errors is small then you know you have a good model. If it isn't then the general form of the chosen model may not be correct or there may be a non-linearity. I like to use differential equations because I can write non-linear differential equations. I don't expect customers to know how many poles their system has so we run the the system identifier with models find which general form of the model is best. In general more poles the better but one must sanity check the result. One method mentioned in my control books was least squares. Least squares didn't work so well. What I can tell is that the authors have NEVER been in the field making real systems work. This is a general complaint I have about professors and why they shouldn't be allowed to teach students.
So I have made two videos. One is for a simple example of system identification. It is too easy but it would probably work for many simple motor systems.
The simple video
The second video is more realistic in that I add noise to make identification hard. I also use a more complicated open loop system. If you notice I use the same open loop transfer function that was used by the instructor's video in the root locus video.
If you want to see the results then
I was not testing my auto tuning program. I was testing the screen capture software I use but I decided to keep the video because it is short.
Notice the control signal.
If it looks like I radiate a little contempt for that teach with out being in the trenches you are not mistaken.
Peter Nachtwey
Delta Computer Systems
The trick to system identification is to start with an open loop model that should approximate how the system will react to open loop control signals. The general type of system should be known. For instance whether the system is integrating ( type 1, position, tank lvel ) or non-integrating ( type 0, temperature or velocity ) and how many poles it has. Other variables that need to be determine are things like offset and dead time. Now a differential equation can be written for the system but the coefficients for the state variables, dead time, offset and gain are unknown. That's OK. The differential equation is the most important part of this phase.
The second part is to excite the open loop system by varying the control signal in a way that will provide the most information about gains and time constants etc. There is no best way to do this but in general changing the control signal between different level somewhat rapidly and recording the response works well. Some systems use square waves but that can be awfully harsh on the equipment. If you use square waves control signals while identifying a hydraulic system with a 50 ton coil of steel on if you will p!$$ people off. Sine waves and ramps will do if the system you are trying to identify doesn't respond that fast in the first place. The result of this phase is have a record of time, control signal and the feed back (PV)
The third part is to make a good guess for the variables that need to be identified and uses them to calculate the estimate response for the trial model. Usually the first estimated response is awful. One judges how awful the response is by using the sum of square error between the estimated response and the measured response. When I first tried this my software faulted because the sum of squared errors exceed the maximum value for a floating point value so be careful.
Next one needs a method of changing the values of the variables so that the sum of squared error is minimized. This may take many trials unless an algorithm like Levenberg-Marquardt or BFGS is used. There are a few different algorithms that can quickly find the values that will minimize the sum of square errors. I like two I mentioned. If the final sum of square errors is small then you know you have a good model. If it isn't then the general form of the chosen model may not be correct or there may be a non-linearity. I like to use differential equations because I can write non-linear differential equations. I don't expect customers to know how many poles their system has so we run the the system identifier with models find which general form of the model is best. In general more poles the better but one must sanity check the result. One method mentioned in my control books was least squares. Least squares didn't work so well. What I can tell is that the authors have NEVER been in the field making real systems work. This is a general complaint I have about professors and why they shouldn't be allowed to teach students.
So I have made two videos. One is for a simple example of system identification. It is too easy but it would probably work for many simple motor systems.
The simple video
The second video is more realistic in that I add noise to make identification hard. I also use a more complicated open loop system. If you notice I use the same open loop transfer function that was used by the instructor's video in the root locus video.
If you want to see the results then
I was not testing my auto tuning program. I was testing the screen capture software I use but I decided to keep the video because it is short.
Notice the control signal.
If it looks like I radiate a little contempt for that teach with out being in the trenches you are not mistaken.
Peter Nachtwey
Delta Computer Systems