MEGR 3171  |  UNC Charlotte Mechatronics 2
Dr. Roger Tipton
Mechanical Engineering & Engineering Science
Back to Course Hub
Final Examination — Finals Week  |  Comprehensive

Final Exam Study Guide

Comprehensive review of all five modules with emphasis on PID control, digital implementation, and system integration. All prior modules are also represented.

Exam Coverage

Key Equations Reference Card

TopicEquation / FormulaNotes
Kline-McClintockw_R = √∑(∂R/∂x_i · w_xi)²RSS uncertainty propagation
Confidence Intervalx̄ ± t·s/√Nt from table at df = N-1
INA GainA = 1 + 2R/R_GR = internal precision resistor
Quarter-bridgeV_out = V_ex·G_f·ε/4Linear approximation
Nyquistf_s ≥ 2·f_maxMinimum sampling rate
ADC resolutionΔ = V_FSR/2&sup_NStep size per count
CJC correctionV_corr = V_meas + V_CJC(T_ref)Type K: ~41 µV/°C
Pt100 linearR(T) ≈ 100(1 + 0.00385T)T in °C; 0-850°C range
Laplace diff.L{dx/dt} = sX(s) - x(0)Key property
Closed-loop TFG_CL = G/(1+GH)Unity feedback: H=1
2nd order ω_dω_d = ω_n√(1-ζ²)Underdamped only
%OSe^(-πζ/√(1-ζ²))×100%Underdamped step response
Settling timet_s = 4/(ζω_n)2% criterion
PID continuousu = K_p·e + K_i∫e dt + K_d·de/dtParallel form
Z-N PID (FOPDT)K_p=1.2T/(KL), T_i=2L, T_d=0.5LReaction curve method
Discrete PI (Tustin)I[k]=I[k-1]+(K_i·T_s/2)(e[k]+e[k-1])Tustin integration
Encoder θ_res360°/(4×PPR)Quadrature decoding
Orifice flowQ = C_d·A_2·√(2ΔP/(ρ(1-(A_2/A_1)²)))Discharge coefficient C_d

Section 1: Modules 1-2 Review

Q1 — Uncertainty The efficiency of a heat exchanger is η = Q_out / Q_in where Q_out = 850 ± 12 W and Q_in = 1000 ± 8 W. Find η and its uncertainty.

η = 850/1000 = 0.850 (85.0%)

∂η/∂Q_out = 1/Q_in = 1/1000 = 0.001 → (0.001×12)² = 0.000144

∂η/∂Q_in = -Q_out/Q_in² = -850/10&sup6; = -0.00085 → (0.00085×8)² = 0.0000046

w_η = √(0.000144 + 0.0000046) = √0.0001486 = 0.01219

η = 0.850 ± 0.012 (1.4% uncertainty)
Q2 — Sensor Selection You need to measure temperature in a diesel engine exhaust stream at 650°C in a high-vibration environment. Select the best sensor type from: thermistor, Type K thermocouple, Pt100 RTD, or Type J thermocouple. Justify.

Thermistor: max ~150°C. Eliminated. Pt100 RTD: max ~850°C but mechanically fragile in vibration. Type J: max ~750°C, susceptible to oxidation above 550°C. Eliminated at 650°C. Type K: max 1350°C, robust, widely available, excellent vibration tolerance in mineral-insulated (MI) sheathed versions.

Type K thermocouple (MI sheathed). High range, vibration-resistant, excellent at 650°C.

Section 2: Module 3 Review

Q3 — Transfer Function and Stability A closed-loop system has open-loop G(s) = K/(s(s+2)(s+4)) with unity feedback. Using Routh-Hurwitz, find the range of K for stability.

Closed-loop characteristic equation: 1 + G(s) = 0 → s(s+2)(s+4) + K = 0

s(s²+6s+8) + K = 0 → s³ + 6s² + 8s + K = 0

Routh array: Row1: 1, 8   Row2: 6, K   Row3: (48-K)/6, 0   Row4: K

For stability, all first-column entries positive: K>0 AND (48-K)/6>0 → K<48

Stable for 0 < K < 48. At K=48: sustained oscillations (marginally stable).

Section 3: PID Control (Module 4)

Q4 — PID Tuning A plant ultimate gain experiment yields Ku = 12 and Tu = 4 s. Calculate PID gains using Ziegler-Nichols ultimate sensitivity method.

K_p = 0.6×K_u = 0.6×12 = 7.2

T_i = T_u/2 = 4/2 = 2 s → K_i = K_p/T_i = 7.2/2 = 3.6 s&sup-¹

T_d = T_u/8 = 4/8 = 0.5 s → K_d = K_p×T_d = 7.2×0.5 = 3.6 s

K_p = 7.2, K_i = 3.6 s&sup-¹, K_d = 3.6 s
Q5 — Anti-Windup Explain what integrator windup is, when it occurs, and one method to prevent it. Use a temperature control example.

Windup: When the heater saturates at 100% power (maximum), the temperature error remains positive. The integral term continues accumulating (winding up) to a very large value. When the setpoint is reached, the large integral forces the controller to maintain full power well past the setpoint, causing severe overshoot. The system then undershoots as the integral finally unwinds.

Prevention (clamping): Stop integrating when the controller output is saturated. If u[k] ≥ u_max and e[k] > 0, set I[k] = I[k-1] (do not update integral).

Windup occurs when actuator saturates and error persists. Prevent with clamping: freeze the integrator when the output is at its limit.

Section 4: Digital Control and Integration (Module 5)

Q6 — Discretization A proportional-only controller C(s) = 5 (gain only, no dynamics) is implemented digitally at Ts = 0.05 s. What is the discrete difference equation? Is there any difference between Euler and Tustin for a pure gain?

A pure gain has no dynamics to discretize. C(s) = 5 maps directly to C[k] = 5 for all methods (Euler forward, backward, Tustin all give the same result for a memoryless gain).

Discrete equation: u[k] = 5·e[k]

u[k] = 5·e[k]. No difference between methods for pure gain (no s dependence to transform).
Q7 — Finite State Machine Design a Moore FSM with states: IDLE, HEATING, COOLING, FAULT. Transitions: IDLE → HEATING (start command received), HEATING → IDLE (setpoint reached), HEATING → FAULT (over-temperature alarm), COOLING → IDLE (temperature acceptable), FAULT → IDLE (manual reset). Draw the state transition diagram conceptually and list each state's output.

Moore FSM outputs (by state):

  • IDLE: Heater=OFF, Cooler=OFF, Alarm=OFF
  • HEATING: Heater=ON, Cooler=OFF, Alarm=OFF
  • COOLING: Heater=OFF, Cooler=ON, Alarm=OFF
  • FAULT: Heater=OFF, Cooler=OFF, Alarm=ON

Missing transition added: HEATING → COOLING (if temperature overshoots significantly). All states must handle undefined inputs (remain in state or go to FAULT).

4-state Moore machine. Each state drives outputs directly. Transitions driven by sensor thresholds and commands. Implement in C++ with enum + switch-case in timer ISR.
Q8 — Comprehensive Integration A team builds a force-controlled gripper. The grip force sensor (strain gauge, quarter-bridge, INA) outputs 0-100 mV for 0-50 N. The controller target is 30 N ± 0.5 N. The ADC is 12-bit with 3.3 V reference. (a) What is the force resolution in Newtons? (b) Is the control target achievable with this hardware?

(a) Sensor sensitivity: 100 mV / 50 N = 2 mV/N. ADC step = 3300 mV / 4096 counts = 0.806 mV/count. Force per count = 0.806 mV ÷ 2 mV/N = 0.403 N/count.

(b) Resolution = 0.403 N. Target tolerance = ±0.5 N = 1.0 N range = ~2.5 counts. This is marginally achievable: the ADC resolution (0.40 N) is below the ±0.5 N tolerance, so the target is achievable if the sensor noise is below 0.5 N (which a good INA and averaging should achieve). A 16-bit ADC would give 0.025 N resolution, which is more comfortable.

(a) Force resolution ≈ 0.40 N/count. (b) Marginally achievable; ADC resolution is within spec but noise margin is tight. Consider 16-bit ADC or averaging for robust performance.