Control Systems: HP prime app, now with frequency, time domain and root locus plots

03292019, 02:27 PM
Post: #1




Control Systems: HP prime app, now with frequency, time domain and root locus plots
This new Control Systems App for the HP Prime is used to study the frequency and time domain responses of control systems consisting of a process and a controller, as well as stability  the app produces Root Locus Plots.
• In the frequency domain, open loop response with and without controller and resulting closed loop response (unity feedback loop) can be determined / compared. • In the time domain, the app calculates the open loop and unity feedback loop response to reference changes as well as to disturbances (appearing between controller and process). It also calculates and visualizes the controller output. Input types: Dirac pulse, unit step and ramp. Although the app type is ‘Parametric’, the app does not rely on the built in HP Prime parametric plot mechanism but on custom plotting routines, including custom mouse movement handling, key press detection and custom soft key menus to accomplish functionality that would not be possible otherwise. The app is entirely menu based (no need to type in commands). The app takes as input the transfer function of a process as well as the settings of a (PID) controller. Plot types: Nyquist, Nichols, Bode, Time domain response, root locus. Bode plot will show magnitude and phase angle charts on one screen, or you can choose to plot magnitude or phase angle only (enlarged). Bode plots real log scales for frequency and magnitude. Magnitude can be displayed in dB as well. Time domain plot will also show controller output or error signal. Root locus plot will highlight all roots for a given gain and indicate whether the system is stable. An extensive user quide is included in the zipped folder attached. Have a look at the screen captures attached to this thread. Note: a previous version of this app (only capable of plotting frequency response, and still relying on standard HP Prime plotting) was posted in a different thread ("Control Systems app for HP Prime"). Please let me know your comments and feedback. 

03292019, 03:03 PM
Post: #2




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
I haven't tried it yet, but I'm sure I'll be fully satisfied. You are great!
however as soon as I have tested it I'll let you know what I think. Domenico 

03302019, 02:30 PM
Post: #3




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
When I open the app the Symb view on the manual is not showed, instead this screen appeared:
What actually is being showed: What should have been showed: 

03312019, 08:17 AM
Post: #4




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
As is explained in the manual, you first need to go into the program editor, just to allow the HP Prime to compile the program correctly (just enter and exit again).
Then, start the app again. It will work. Regards 

03312019, 07:52 PM
Post: #5




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
Thanks a lot, the app works greatly!!
Very good job!! Does the program looks for root locus over K>100 ? Is there any way to set up minimum K range and maximum K range to show root locus? (and step options?) 

04012019, 07:44 AM
Post: #6




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
Hi
In Plot Setup, page 3, you can set the range of K values and the sample size. The Krange for the plot is centered around the current controller gain (if no controller is selected, then this 'center' gain is 1). Example: suppose controller gain is 200 . Select K range: controller gain x 0.02  x 50 ==> this will plot for a gain range from 4 to 10000. Select sample size 50. ==> the plot will contain the roots for K = 4, K = 4.68, K = 5.47, ....., K = 200 (centerpoint), ..., K = 8.55 E3, K = 1 E4 (so, in fact, the sample size will be 51 = uneven, to allow K = 200 as center point). You can quickly go to center point and end points by pressing Shift and then the left or right arrows. Note that K values form a geometric progression (each K value is calculated by multiplying the previous K value by a fixed factor). BUT you can display the roots for ANY K value (also outside the selected range) by pressing Goto and then filling in that K value (when the plot is displayed). If you enter K = 0, the roots for the OPEN LOOP system will be shown. Use the OPTIMIZE softkey to adjust the plot if necessary. You might want to check out the manual ! Most is explained there :) Thanks for your feedback Herwig 

04012019, 10:40 PM
Post: #7




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
I've understood that, I mean if I wanted to set It manually, for example from K= 0.05 to 1000 with 0.05 step.
But your app is great!! Very nice job done!! 

04072019, 12:35 PM
(This post was last modified: 04072019 12:36 PM by hata.)
Post: #8




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
Hi Chandler
No, you can't specify the end points of the range, you specify the midpoint (= controller gain) AND you specify the relative range from a dropdown list (e.g. x 0.02  x 50)  which gives you the endpoints of course. In case you don't have a controller (only a process): select controller type 'P' (proportional) and enter the desired midpoint for the open loop gain range. If the open loop gain (center point) is already baked in the process (transfer function) itself, than enter '1' as desired midpoint for open loop gain, or select controller type 'none'. Note that the two last options in the dropdown list for open loop gain range allow you to enter one endpoint for the range  because the range lies completely to the left (x 0.01  x 1) resp. to the right (x 1  x 100) of this endpoint then. Also note that there is not a fixed linear step involved between samples, but a factor by which the frequency of each sample is increased to calculate the frequency of the next sample: the samples form a geometric series. This makes more sense, because in the high frequency range you want this step to be greater than in the low frequency range. Compare with a Bode chart, which is logarithmic for the same reason. You don't choose the factor yourself  it is calculated for you based on the number of samples you want (drop down menu) and the open loop gain range (drop down menu). Hope this helps. Regards 

04082019, 01:20 PM
Post: #9




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
Very impressive, great work. I have a some reading to do.
Eddie 

04102019, 09:58 AM
Post: #10




RE: Control Systems: HP prime app, now with frequency, time domain and root locus plots
OK, thanks ... happy reading, then !
Let me know if you have any question. Regards Herwig 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)