This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
parallel_flexure_guide_transfer [2020/06/04 12:20] marijn.nijenhuis |
parallel_flexure_guide_transfer [2021/05/05 14:17] (current) marijn.nijenhuis |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Example: Compute transfer function of a parallel flexure guide ===== | ===== Example: Compute transfer function of a parallel flexure guide ===== | ||
- | This example shows the computation of the transfer function from input actuator force (force in x-direction on the end-effector) to output stage displacement (motion in x-direction of the end-effector) of a parallel flexure guide. | + | This example shows the computation of the transfer function from input actuator force (force in x-direction on the end-effector) to output stage displacement |
{{:: | {{:: | ||
- | The state-space equations (from which the transfer function follows) can be computed by specifying the input and output for the transfer function. For this example, actuation force in x-direction on node 3 (a node on the end-effector) is used for input, and displacement in x-direction of node 3 is used for the output. This can be specified with the '' | + | The state-space equations (from which the transfer function follows) can be computed by specifying the input and output for the transfer function. For this example, actuation force in x-direction on node 3 (a node on the end-effector) is used for input. Two desired outputs are specified: the first is the displacement in x-direction of node 3; the second |
<code matlab> | <code matlab> | ||
- | nprops(3).transfer_in | + | nprops(3).transfer_in |
- | nprops(3).transfer_out = {' | + | nprops(3).transfer_out = {' |
+ | nprops(5).transfer_out = {' | ||
... | ... | ||
opt.transfer = {true 0.01}; | opt.transfer = {true 0.01}; | ||
Line 20: | Line 21: | ||
For details, see the [[full_syntax|SPACAR Light full syntax]]. | For details, see the [[full_syntax|SPACAR Light full syntax]]. | ||
- | The resulting transfer function is plotted in the figure below. The first eigenfrequency is approximately 10 rad/ | + | The resulting transfer function |
- | {{::transfer pfg.png? | + | {{::bode.png? |
+ | |||
+ | Note that in case of multiple inputs and/or outputs, the resulting state-space structure in MATLAB will also indicate with named labels what these inputs and outputs are (i.e. node number and displacement, | ||
An example file for providing the input for SPACAR Light and plotting the transfer function is provided below. | An example file for providing the input for SPACAR Light and plotting the transfer function is provided below. | ||
Line 66: | Line 69: | ||
eprops(1).elems | eprops(1).elems | ||
eprops(1).emod | eprops(1).emod | ||
- | eprops(1).smod | + | eprops(1).smod |
eprops(1).dens | eprops(1).dens | ||
eprops(1).cshape | eprops(1).cshape | ||
Line 75: | Line 78: | ||
eprops(1).color | eprops(1).color | ||
eprops(1).opacity | eprops(1).opacity | ||
- | eprops(1).cw = true; | + | % eprops(1).warping |
%Property set 2 | %Property set 2 | ||
Line 89: | Line 92: | ||
%% OPTIONAL ARGUMENTS | %% OPTIONAL ARGUMENTS | ||
opt.transfer = {true 0.01}; | opt.transfer = {true 0.01}; | ||
- | opt.filename = ' | + | opt.filename = ' |
%% CALL SPACAR_LIGHT | %% CALL SPACAR_LIGHT | ||
Line 95: | Line 98: | ||
%% Plot transfer function | %% Plot transfer function | ||
- | figure | + | %set some convenient defaults for the plot. Not necessary, but they can improve the plots |
- | bode(out.statespace, | + | bodeopt = bodeoptions; |
- | grid minor | + | bodeopt.Title.String = 'Title for this plot'; |
+ | bodeopt.FreqUnits = ' | ||
+ | bodeopt.Xlim = [1,4000]; %frequency axis limits | ||
+ | bodeopt.Grid = ' | ||
+ | |||
+ | bodeopt.Title.FontSize = 14; %font size for title | ||
+ | bodeopt.XLabel.FontSize = 12; %font size for xlabels | ||
+ | bodeopt.YLabel.FontSize = 12; %font size for ylabels | ||
+ | bodeopt.TickLabel.FontSize = 12; %font size for the ticks (numbers on axes) | ||
+ | bodeopt.InputLabels.FontSize = 12; | ||
+ | bodeopt.OutputLabels.FontSize = 12; | ||
+ | |||
+ | bodeopt.PhaseMatching = ' | ||
+ | bodeopt.PhaseMatchingFreq = 1; %--at this frequency | ||
+ | bodeopt.PhaseMatchingValue = 0; %--the phase is close to this value | ||
+ | |||
+ | h = bodeplot(out.statespace, | ||
</ | </ |