Prev: RGB to gray scale to RGB
Next: Phase shift in Simulink
From: James Allison on 29 Mar 2010 14:18 With Simulink Control Design, you can both export a linear model to MATLAB, and look at the root locus from within the Simulink environment. Here is the link I posted earlier: http://www.mathworks.com/access/helpdesk/help/toolbox/slcontrol/ug/brz_wd6.html I'll try to summarize the process. 1) To export a transfer function to MATLAB, first you need to linearize the system. To do this, identify the input and output of your system. Right click on the input signal, and choose Linearization Points -> Input Point to attach a linearization point to the input. Do the same for the output. 2) From the Simulink model menu, choose Tools -> Control Design -> Linear Analysis. This will open the Control and Estimation Tools Manager. Click the Linearization Results tab, then Linearize Model. An LTI object is created, and the LTI Viewer opens up. 3) Once the LTI object is created, you can do several things. You can generate MATLAB code that shows you how to perform linearization programmatically (see the File menu in the Control and Estimation Tools Manager). In the LTI viewer you can choose File -> Export to export the model to the workspace. You can convert this to a MATLAB transfer function using ss2tf. The above is the basic process, but there are many more details described in the documentation that I linked to above. If you want to view a root locus plot, you don't actually need to export a model to MATLAB. In the Control and Estimation Tools Manager you can select Tools -> Control Design -> Compensator Design to get started. You can create a SISO design task, and view and adjust the root locus plot in the SISO design tool. The following link, also from the Simulink Control Design documentation, describes this process in more detail: http://www.mathworks.com/access/helpdesk/help/toolbox/slcontrol/ug/br684zp.html If you need further help you can contact technical support (mathworks.com -> support -> contact support). Best Regards, -James Susan wrote: > Thank you, > > Maybe my question is confusing. I've been using MATLAB for awhile now > and know how to write TFs in MATLAB and how to simulate my model in > Simulink as well. I've worked through several webinars when I was first > learning Simulink, but I never found the answer to this question: > > How do you get data from Simulink and have it imported into MATLAB?
From: Guy Rouleau on 29 Mar 2010 19:51
"Susan " <susanreneemueller(a)gmail.com> wrote in message <hogubc$phl$1(a)fred.mathworks.com>... > I have a transfer function that I want to put into series 5 times. I want to find the sum of the 5 TFs. I know how to put the 5 TFs in series using simulink, but is there a way to get the sum of the TFs back into MATLAB? I ultimately want to find the root locus of the TF. Hi, The MATLAB equivalent of placing Simulink TF blocks in series is to multiply the TFs. In Simulink you have TF2 and TF2 in series, in MATLAB you do sys = TF1*TF2; for the equivalent system. If you want them in parallel, then it is the sum operator. The control system Toolbox also has functions like PARALLEL and SERIES allows you to combine the TF in a similar way. See: http://www.mathworks.com/access/helpdesk/help/toolbox/control/ref/series.html http://www.mathworks.com/access/helpdesk/help/toolbox/control/ref/parallel.html I hope this helps Guy |