# kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr architecture

> Architecture diagram of the GitHub repository kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr
- Repository: https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr

## Overview

This repository presents an LQR-based, integral-action FOC design for PMSM drives. The documented workflow is to formulate coupled d–q dynamics, tune feedback and integral gains using Bryson’s rule, then evaluate transient tracking and sensitivity in the Simulink model. The tree exposes the model only as an archive; the README describes scripts and model contents that are not individually present, so internal implementation links are limited to documented relationships.

Main entry points: [`Model_FOC.zip`](https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/Model_FOC.zip) (LQR integral tuning), [`FOC.pdf`](https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/FOC.pdf) (Sensitivity analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_design["Controller design"]
  node_dynamics["PMSM d-q dynamics<br/>[Model_FOC.zip]"]
  node_lqr["LQR integral tuning<br/>[Model_FOC.zip]"]
end

subgraph group_evaluation["Model and evaluation"]
  node_simulink["FOC Simulink model<br/>[Model_FOC.zip]"]
  node_sensitivity["Sensitivity analysis<br/>[FOC.pdf]"]
end

node_engineer(("Control engineer"))

node_engineer -->|"formulates"| node_dynamics
node_dynamics -->|"informs tuning"| node_lqr
node_engineer -->|"synthesizes gains"| node_lqr
node_lqr -.->|"controls"| node_simulink
node_engineer -->|"evaluates"| node_simulink
node_simulink -->|"benchmarks"| node_sensitivity

click node_dynamics "https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/Model_FOC.zip"
click node_lqr "https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/Model_FOC.zip"
click node_simulink "https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/Model_FOC.zip"
click node_sensitivity "https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/FOC.pdf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dynamics,node_lqr toneBlue
class node_simulink,node_sensitivity toneAmber
class node_engineer toneIndigo
```

## Components

### Controller design

- [PMSM d-q dynamics](https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/Model_FOC.zip): `Model_FOC.zip`
- [LQR integral tuning](https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/Model_FOC.zip): `Model_FOC.zip`

### Model and evaluation

- [FOC Simulink model](https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/Model_FOC.zip): `Model_FOC.zip`
- [Sensitivity analysis](https://github.com/kar140597/field-oriented-control-of-a-permanent-magnet-synchronous-motor-with-lqr/blob/main/FOC.pdf): `FOC.pdf`

### Other components

- **Control engineer**

## Connections

- Control engineer → PMSM d-q dynamics: formulates (evidence: `README.md`)
- PMSM d-q dynamics → LQR integral tuning: informs tuning (evidence: `README.md`)
- Control engineer → LQR integral tuning: synthesizes gains (evidence: `README.md`)
- LQR integral tuning → FOC Simulink model: controls
- Control engineer → FOC Simulink model: evaluates (evidence: `README.md`)
- FOC Simulink model → Sensitivity analysis: benchmarks (evidence: `README.md`)
