Prev: Passing structure of pointers as an argument
Next: GUI: Pushbutton to save an image in a directory
From: Maxim on 19 May 2010 12:31 I wonder if it is possible to convert a signal output of some block to other block parameter. In particular, can I use output of the "Signal Generator" or similar block or subsystem to control the parameters of the "Transfer Fcn" block, such as "Denominator coefficients"? I can put [A 1] for denominator coefficients, but then, how can I make A equal to the output of the "Signal Generator" Block?
From: Will Cross on 19 May 2010 14:01 I don't know of a way to change a block parameter at runtime, but for your specific problem there is a different solution. Instead of using a transfer function block to model your system, first rewrite your transfer function by solving for the highest order derivative. Now implement this equation in Simulink using integrator blocks, sum blocks, multiply, and constant blocks. For constant parameters, you would usually use gain blocks, but for variable parameters like you want, use a multiply block. For the parameter that you need to vary, feed the signal generator you are using into the multiply block. If you need an example, let me know. -Will
From: Maxim on 19 May 2010 14:34 "Will Cross" <crosspatrickw(a)johndeere.com> wrote in message <ht191g$985$1(a)fred.mathworks.com>... > For the parameter that you need to vary, feed the signal generator you are using into the multiply block. > > If you need an example, let me know. > -Will Hmm, interesting approach. So, what would be the model if in transfer function the numerator is just 1, and denominator parameters are variables/signals [A B]? I do not understand how I create this function just using simple integrators (or other blocks?) and multipliers?
From: Maxim on 19 May 2010 16:09 "Will Cross" <crosspatrickw(a)johndeere.com> wrote in message <ht191g$985$1(a)fred.mathworks.com>... > I don't know of a way to change a block parameter at runtime, but for your specific problem there is a different solution. Instead of using a transfer function block to model your system, first rewrite your transfer function by solving for the highest order derivative... I was unable to use this advice, because the solution for the highest derivative is still Transfer Function which is not easier than the original one, and also depends on the same parameters. So, finally I simply wrote S-function, and combined all parameters with the time signal using Mux for the input of the function. It is good that level-1 S-function example for integrator is provided - it is slight modification of that file (and level-2 functions is way too difficult to understand)
|
Pages: 1 Prev: Passing structure of pointers as an argument Next: GUI: Pushbutton to save an image in a directory |