๐Ÿ”ข Fixed-Point Design for Vโ€“I Control

This chapter explains how continuous-valued control equations are mapped into fixed-point arithmetic suitable for a deterministic digital ASIC implementation.

All voltage V and current I signals are treated explicitly as fixed-point numbers, with bounded range and known precision.


๐ŸŽฏ Why Fixed-Point?

Floating-point arithmetic is avoided in this design because:

Fixed-point arithmetic provides:

These properties are essential for control and safety-critical systems, where timing and numerical behavior must be provable.


๐Ÿ“ Signal Normalization (Vโ€“I)

Before entering the control core, all physical signals are normalized.

Voltage

Let the physical voltage range be:

\[0 \le V_{\text{phys}} \le V_{\text{max}}\]

The normalized digital voltage is defined as:

\[V[n] = \frac{V_{\text{phys}}}{V_{\text{max}}}\]

Current

Similarly, for current:

\[0 \le I_{\text{phys}} \le I_{\text{max}}\] \[I[n] = \frac{I_{\text{phys}}}{I_{\text{max}}}\]

After normalization:

This ensures that all subsequent fixed-point computations operate on bounded, dimensionless quantities.


๐Ÿงฉ Fixed-Point Data Path (Conceptual)

The fixed-point data path is defined before RTL coding to make numerical behavior explicit and analyzable.

V[n], I[n]  (Q1.15)
   โ”‚
   โ–ผ
Error computation
e[n] = V_ref[n] โˆ’ V[n]      (Q2.15)
   โ”‚
   โ–ผ
+----------------------+
| PID Computation      |
|  - P term            |
|  - I accumulator     |
|  - D term (optional) |
+----------------------+
   โ”‚   (bit growth)
   โ–ผ
Saturation & truncation
   โ”‚
   โ–ผ
u[n]  (Q2.15)
   โ”‚
   โ–ผ
PWM mapping

This conceptual data path explicitly defines:

RTL waveforms confirming this behavior are provided in
Appendix A: Figure List.


๐Ÿงฎ Q-Format Representation

A fixed-point number is represented as:

\[x = \text{integer} \times 2^{-f}\]

where:

Example: Q1.15 Format

Range:

\[-1.0 \le x < +1.0\]

Resolution:

\[\Delta = 2^{-15}\]

This format is well suited for normalized V and I signals.


โš™๏ธ Fixed-Point PID Computation

The discrete-time PID equation:

\[u[n] = K_p e[n] + K_i \sum e[n] + K_d (e[n] - e[n-1])\]

is implemented using fixed-point multipliers and adders.

Gain Representation

Care must be taken to allocate sufficient bit width for intermediate multiplication results.


๐Ÿšจ Saturation and Overflow Handling

Unlike software, hardware must explicitly define behavior when numerical limits are exceeded.

Saturation Policy

If a computed value exceeds the allowed range:

This avoids wrap-around behavior, which can cause catastrophic instability in control systems.

All saturation points are explicitly coded in RTL.


๐Ÿ“Š Bit-Width Planning (Example)

Signal Format Notes
$V[n]$, $I[n]$ Q1.15 Normalized input
$e[n]$ Q2.15 Signed error
$\sum e[n]$ Q4.15 Accumulated integral
$u[n]$ Q2.15 Control output

These values are design examples, chosen to illustrate:

Actual formats may be adjusted based on system requirements.


โฑ Deterministic Latency

Each fixed-point operation:

Therefore, the total control latency is:

\[T_{\text{latency}} = N_{\text{cycles}} \times T_{\text{clk}}\]

This makes worst-case timing trivial to compute and verify.


๐Ÿงช Verification Strategy

Fixed-point behavior is verified by:

This ensures numerical correctness before synthesis.


โžก๏ธ Next

Proceed to RTL implementation:

โžก๏ธ RTL: PID Core

The next chapter maps the control equations directly into synthesizable Verilog RTL.


โฌ…๏ธ Navigation