Consider a Simulink model with a continuous integrator block connected to a discrete zero-order hold (ZOH) block with a sample time of 0.1 seconds. The input to the integrator is a constant signal of value 2. What is the output of the ZOH block at time t = 0.3 seconds?
Integrator input: constant 2 Integrator initial condition: 0 ZOH sample time: 0.1 seconds Calculate output at t=0.3 seconds.
Remember the integrator output is the integral of the input over time. The ZOH holds the value sampled at discrete intervals.
The integrator output at t=0.3 is integral of 2 from 0 to 0.3, which is 2 * 0.3 = 0.6. The ZOH samples at 0, 0.1, 0.2 seconds and holds the value until next sample. At t=0.3, the output is the value sampled at 0.3, which is 0.6.
A Simulink model runs a simulation for 5 seconds. It contains a discrete block with a sample time of 0.2 seconds. How many discrete samples will this block produce during the simulation?
Simulation time: 5 seconds Discrete block sample time: 0.2 seconds Calculate number of samples generated.
Divide total simulation time by sample time and consider the initial sample at time zero.
The samples occur at t=0, 0.2, ..., 4.8, 5.0 seconds, total 26 samples. Number of samples = (5 / 0.2) + 1 = 26.
You have a continuous-time integrator with input u(t) = 1, connected to a discrete sampler with sample time 0.5 seconds. Sketch or describe the expected output plot of the discrete sampler over 3 seconds.
Input: u(t) = 1 (constant) Integrator initial condition: 0 Discrete sampler sample time: 0.5 seconds Simulation time: 3 seconds
The integrator output increases linearly over time. The discrete sampler samples this output at fixed intervals, holding the value until next sample.
The integrator output at time t is integral of 1 dt = t. The discrete sampler samples this at 0, 0.5, 1.0, ..., 3.0 seconds, producing values 0, 0.5, 1.0, ..., 3.0. The output is a stepwise plot increasing by 0.5 every 0.5 seconds.
A user sets up a Simulink model with a continuous integrator block feeding into a discrete unit delay block with sample time set to -1 (inherited). The simulation runs but the discrete block output remains constant zero. What is the most likely cause?
Check the sample time settings of discrete blocks when connected to continuous blocks.
Setting sample time to -1 means inherited sample time. If the discrete block inherits continuous sample time, it may not update properly. This causes output to remain constant zero. Defining a positive discrete sample time fixes the issue.
You want to model a temperature control system where the temperature changes continuously but the controller updates its output every 1 second. Which Simulink blocks and configuration best represent this mixed continuous-discrete system?
Think about which parts of the system are continuous and which are discrete in time.
The temperature changes continuously, so a continuous integrator models it well. The controller updates at discrete intervals, so a discrete PID controller with sample time 1 second fits. This combination models the mixed continuous-discrete system correctly.
