Quiz on Higher Order Simulation


1. What types of dynamic models can Python methods numerically simulate? Select all that apply.

A. Laplace domain transfer function with step input
Correct. Use scipy.signal.TransferFunction with the scipy.signal.step function.
B. Linear ordinary differential equations
Correct. Use the scipy.integrate.odeint or scipy.integrate.solve_ivp function
C. State space model with step input
Correct. Use the scipy.signal.StateSpace package with the scipy.signal.step function
D. Semi-explicit nonlinear differential equations
Correct. Use the scipy.integrate.odeint or scipy.integrate.solve_ivp function

2. Consider a typical first order system `\tau_p {dy}/{dt} = -y + K_p u` simulated using a state space model. Doubling the value of both `K_p` and `\tau_p` change the value of which state space parameter(s)?

$$\dot x = A x + B u$$

$$y = C x + D u$$

$$A = -\frac{1}{\tau_p} \quad B = \frac{K_p}{\tau_p} \quad C=1 \quad D=0$$

A. A and B
Incorrect. B does not change, both the numerator and denominator are multiplied by a factor of two that cancels out.
B. C
Incorrect. The output term does not change
C. A
Correct. The state matrix A is the only one that changes
D. B
Incorrect. The state matrix A is the only one that changes

3. What is the potential issue of using a numerical integrator such as odeint for higher order simulations?

A. odeint cannot solve systems that are higher than third order
Incorrect. odeint solves large-scale systems of linear or nonlinear differential equations
B. odeint is much slower than other modeling languages for all high order simulations
Incorrect. For many high order simulations odeint is faster, it is only when there begins to be thousands of equations that odeint slows down significantly.
C. odeint solve time grows at an exponential rate with the increase in order of simulation
Correct. The adaptive time stepping and finite difference gradients of odeint can cause a slow-down for large models with 1000s of differential equations
D. solutions found in odeint are inaccurate
Incorrect. odeint and solve_ivp use adaptive time steps to maintain a specified accuracy