Solutions for Matlab Simulink and RTW
Friday, 21 November 2008
 
  Home arrow Tutorials arrow Simulink Dynamic Backlash Block  
Home Consulting Tutorials Downloads Matlab Snippets Code Candy Contact Links
Simulink Dynamic Backlash Block Print E-mail
Written by Brad Phelan   
Saturday, 16 April 2005

A question was recently posted on CSSM asking if there was a dynamic backlash block for Simulink. Unfortuntately there is not one in the standard library but it is not too hard to construct one. First of all just write down the algorithm as if it were in C.


      • U(t) -  The input to the block
      • Y(t) - The output of the block at time t
      • B     - Half the dead band width

At time t we execute the following logic

if U(t) > Y(t-1) + B
   Y(t) = U(t) - B
elseif U(t) < Y(t-1) - B
   Y(t) = U(t) + B
else
   Y(t) = Y(t-1)
end

First of all it is usefull to implement the if then elseif else end logic in Simulink. We don't need the if then else subsystems that Simulink provides. In this case it just makes the solution more complex. We can solve this by nesting two Simulink switch blocks.

The if then else block is then placed in a subsystem where we implement the algorithm as described above


 To confirm that our dynamic backlash block does indeed work we create a test model were we verify it against the standard backlash block.

 Click to download model

 


 

 

Last Updated ( Friday, 22 April 2005 )
Sponsored by

Sole Central

Your one stop shop for Birkenstock shoes and sandles.