modeling and simulation of physical systems for hobbyists
play

Modeling and Simulation of Physical Systems for Hobbyists Manuel - PowerPoint PPT Presentation

Modeling and Simulation of Physical Systems for Hobbyists Manuel Aiple 35C3 29 December 2018 CC-BY 4.0 version f59c89b Modeling and Simulation of Physical Systems for Hobbyists Mathematical Running Hardware With commonly description a


  1. Modeling and Simulation of Physical Systems for Hobbyists Manuel Aiple 35C3 — 29 December 2018 CC-BY 4.0 version f59c89b

  2. Modeling and Simulation of Physical Systems for Hobbyists Mathematical Running Hardware With commonly description a model available tools of a system

  3. Why use Simulation? Motivation

  4. Why use Simulation? • Placeholder for hardware components • Virtual test bench Motivation

  5. Very Simple Detailed Detailed Apple Moves Apple Accelerates Apple Accelerates Down Down Down Until Saturation x x x t t t As simple as possible, as detailed as necessary Modeling Picture: Newton portrait with apple tree by Mariana Ruiz Villarreal (LadyofHats) CC0-1.0 (Recomposed)

  6. Differentiation & Integration Differentiation & Integration

  7. Differentiation & Integration Position x ( t ) Velocity v ( t ) Acceleration a ( t ) Differentiation & Integration

  8. Differentiation & Integration Position x ( t ) Velocity Differentiate v ( t ) Acceleration a ( t ) Differentiation & Integration

  9. Differentiation & Integration Position x ( t ) Velocity Integrate Differentiate v ( t ) Acceleration a ( t ) Differentiation & Integration

  10. Differentiation & Integration Position x ( t ) x ( t + h ) − x ( t ) v ( t ) = lim h h→ 0 Velocity Integrate Differentiate v ( t ) Acceleration a ( t ) Differentiation & Integration

  11. Differentiation & Integration Position x ( t ) x ( t + h ) − x ( t ) h→ 0 x ( t + h ) = x ( t ) + lim lim h→ 0 v ( t ) h v ( t ) = lim h h→ 0 Velocity Integrate Differentiate v ( t ) Acceleration a ( t ) Differentiation & Integration

  12. Differentiation & Integration Position x ( t ) Looking into the future Looking into the past x ( t + h ) − x ( t ) h→ 0 x ( t + h ) = x ( t ) + lim lim h→ 0 v ( t ) h v ( t ) = lim h h→ 0 Velocity Integrate Differentiate v ( t ) Acceleration a ( t ) Always integrate for simulation Differentiation & Integration

  13. Euler Method h→ 0 x ( t + h ) = x ( t ) + lim lim h→ 0 v ( t ) h → Not usable for computation Euler Method

  14. Euler Method h→ 0 x ( t + h ) = x ( t ) + lim lim h→ 0 v ( t ) h → Not usable for computation Replace infinitesimal lim h→ 0 h with finite T s and only calculate for integer multiples k of T s : t = k T s Euler Method

  15. Euler Method h→ 0 x ( t + h ) = x ( t ) + lim lim h→ 0 v ( t ) h → Not usable for computation Replace infinitesimal lim h→ 0 h with finite T s and only calculate for integer multiples k of T s : t = k T s � t + T s � � t � � t � x = x + v T s T s T s T s Euler Method

  16. Euler Method h→ 0 x ( t + h ) = x ( t ) + lim lim h→ 0 v ( t ) h → Not usable for computation Replace infinitesimal lim h→ 0 h with finite T s and only calculate for integer multiples k of T s : t = k T s � t + T s � � t � � t � x = x + v T s T s T s T s x ( k + 1) = x ( k ) + v ( k ) T s Euler Method

  17. Euler Method h→ 0 x ( t + h ) = x ( t ) + lim lim h→ 0 v ( t ) h → Not usable for computation Replace infinitesimal lim h→ 0 h with finite T s and only calculate for integer multiples k of T s : t = k T s � t + T s � � t � � t � x = x + v T s T s T s T s x ( k + 1) = x ( k ) + v ( k ) T s Keep T s small Euler Method

  18. Building Blocks Mechanics Building Blocks Mechanics

  19. Building Blocks Mechanics v M · Building Blocks Mechanics

  20. Building Blocks Mechanics v F F = M d v M · d t Second law of motion Building Blocks Mechanics

  21. Building Blocks Mechanics v F F = M d v M · I d t ω Second law of motion Building Blocks Mechanics

  22. Building Blocks Mechanics v F F = M d v T = I d ω M · I d t d t ω Second law of motion T Building Blocks Mechanics

  23. Building Blocks Mechanics v F F = M d v T = I d ω M · I d t d t ω Second law of motion T F = M g Weight Building Blocks Mechanics

  24. Building Blocks Mechanics v F F = M d v T = I d ω M · I d t d t ω Second law of motion T F = M g Weight x F = −κ ( x − x 0 ) F Spring force κ Building Blocks Mechanics

  25. Building Blocks Mechanics v F F = M d v T = I d ω M · I d t d t ω Second law of motion T F = M g Weight x F = −κ ( x − x 0 ) F Spring force κ F = −b v Viscous damping Building Blocks Mechanics

  26. Building Blocks Electric Building Blocks Electric

  27. Building Blocks Electric R V = R i Resistor Building Blocks Electric

  28. Building Blocks Electric R V = R i Resistor L V = L d i d t Inductance Building Blocks Electric

  29. Building Blocks Electric R V = R i Resistor L V = L d i d t Inductance C i = C d V d t Capacitor Building Blocks Electric

  30. Building Blocks Electromechanics ω T M Building Blocks Electromechanics

  31. Building Blocks Electromechanics T = K t i Motor ω T M Building Blocks Electromechanics

  32. Building Blocks Electromechanics T = K t i Motor ω V = K v ω Generator T M Building Blocks Electromechanics

  33. Building Blocks Electromechanics T = K t i Motor ω V = K v ω Generator T V = R i + L d i M d t + K v ω I d ω d t = K t i − b ω Electric motor Building Blocks Electromechanics

  34. Tips & Tricks 1. Sampling Period ( T s ): min. 100x faster than system time constant 2. Block Diagram: helps to keep overview 3. Adapt the model to your needs: different questions might need different models 4. Specialized Tools (SciPy, OpenModelica/OMEdit, Scilab/XCos): • for complex models or as reference • better differential equation solving (BDF, Runge-Kutta, etc.) • efficient through variable time-step • nice data logging and visualization tools Tips & Tricks

  35. B d ω − d t � ω � + T ext 1 / I θ + K v K t d i + d t � i + V sup 1 /L i − R Motor Model Block Diagram

  36. Background & Further Reading (Wikipedia) • Scientific modeling • Ordinary differential equation • Numerical methods for ordinary differential equations – Euler Method – Runge-Kutta – Backward differentiation formula (BDF) • Discrete time and continuous time • State-space representation Background & Further Reading

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend