State Space Calculator

Build, test, and inspect dynamic models quickly. Enter matrices, states, and inputs with clear guidance. View outputs, ranks, trends, and exports in one dashboard.

Calculator Inputs

Use commas or spaces between values. Separate rows with new lines or semicolons.

Example Data Table

Parameter Example value Meaning
A [[0, 1], [-5, -2]] State interaction matrix for a second-order system.
B [[0], [1]] Input influence on the state variables.
C [[1, 0]] Measured output taken from the first state.
D [[0]] Direct feedthrough from input to output.
x [0.5, 0] Initial state values at the current instant.
u [1] Constant input applied during the simulation.
Δt 0.1 Simulation time step for continuous projection.
Steps 25 Number of plotted updates in the response.

Formula Used

Continuous model: ẋ = Ax + Bu and y = Cx + Du.

Projected continuous step: x(t + Δt) ≈ x(t) + Δt(Ax + Bu).

Discrete model: x[k+1] = Ax[k] + Bu[k] and y[k] = Cx[k] + Du[k].

Controllability matrix: [B AB A²B ... Aⁿ⁻¹B]. Full controllability usually requires rank n.

Observability matrix: [C; CA; CA²; ...; CAⁿ⁻¹]. Full observability usually requires rank n.

How to Use This Calculator

  1. Select whether the system is continuous or discrete.
  2. Choose state, input, and output dimensions.
  3. Enter matrices A, B, C, and D with matching sizes.
  4. Provide the current state vector and input vector.
  5. Set the time step and number of simulation steps.
  6. Press the calculate button to show results above the form.
  7. Review vector values, ranks, and the trajectory graph.
  8. Export the summary using the CSV or PDF buttons.

FAQs

1. What does the A matrix represent?

The A matrix describes how each state variable affects every other state when no external input changes. It captures the internal dynamics of the modeled engineering system.

2. Why do I need the B matrix?

The B matrix maps external inputs into the state equations. It tells the calculator how control actions, forces, voltages, or commands influence the system states.

3. What is the difference between C and D?

C converts the state vector into measured outputs. D adds any direct input-to-output path. Many physical systems use a zero D matrix when no immediate feedthrough exists.

4. When should I choose continuous mode?

Choose continuous mode when your governing equations are differential equations in time. The tool then computes the state derivative and estimates the next state using the selected time step.

5. When should I choose discrete mode?

Use discrete mode for sampled systems, digital controllers, or models already written as step-to-step updates. The calculator directly returns the next state vector for each sample.

6. What do controllability and observability ranks mean?

Controllability rank checks whether inputs can steer all states. Observability rank checks whether outputs contain enough information to reconstruct all states. Full rank usually equals the state dimension.

7. Can I model multi-input and multi-output systems?

Yes. The calculator supports up to four states, four inputs, and four outputs. Enter matrices with matching dimensions and the solver will compute all linked vectors.

8. Why is my result showing a dimension error?

A dimension error means at least one matrix or vector does not match the selected sizes. Check row counts, column counts, and the number of values in each vector.

Related Calculators

stepper motor torque calculatorlead screw torque calculatorball screw efficiency calculatorrobot payload calculatorservo motor sizing calculatordc motor speed calculatortorque speed calculatormotion profile calculatorload cell calculatorthermal load calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.