---
# System prepended metadata

title: Vehicle Dynamics Simulation

---

# Vehicle Dynamics Simulation

## Preliminary Planning 初步規劃
The powertrain model will be contructed in two stage respectfully. In the first stage the model will be constructed with Simulink blocks. The simulink model will be tested to ensure the accuracy and compatibility. 
Then Matlab code will be used to construct the model in the second stage, let the model has better flexibility and be much more transparent.

動力系統的模型會分為兩階段進行。第一階段使用Simulink block diagram 建立模型，較快速簡單，在模型搭建完成後會利用測試資料進行比對，確保模型的正確性與適用程度。第二階段則會以 MATLAB code 建立模型，以達成更靈活且透明的動態模型。

### Time Table 時程表

| Time Period | Item | Description |
| ----------- | ---- | ----------- |
| Oct. 01 - Oct. 13 | Simulink Block Diagram -- Ideal Model | Motor, battery, back EMF, feedback torque, (thermo) |
| Oct. 01 - Oct. 07 | Test Plan | Battery test, Motor test |
| Oct. 08 - Oct. 14 | Charge-discharge curve | Complete battery test |
| Oct. 15 - Oct. 21 | T-N Curve | Complete motor test |
| Oct. 22 - Oct. 28 | Simulink Block Diagram -- Ideal Model debug | Debug with testing results |
| Oct. 29 - Nov. 04 | Simulink Block Diagram -- Actual Model | Add loss nodes |
| Oct. 29 - Nov. 25 | MATLAB code Model -- Ideal Model | Motor, battery, back EMF, feedback torque, (thermo) |

### Test Plan 測試計畫
1. Battery charge-discharge curve test
   [Battery Test](https://hackmd.io/@oWglkEqYTKGbPbPwRKbung/SyKkkzTzi)
2. Motor T-N curve
https://vocus.cc/article/62c562bffd897800015148d7
最好可以有特性曲線圖，包含電壓、電流、效率等
3. Nodes efficiency
測試各傳動接點的效率

### Spec
| Part | Model | Specification | Datasheet |
| ---- | ----- | ------------- | --------- |
| Motor | Hi Power RS540-8020DF | 7.2V |
| Battery | | 7.2V 2000mAh | https://docs.rs-online.com/28c3/0900766b811db0c5.pdf |
| Gear Ratio | | 1/8.133 | |

### Flow Chart
流程圖(力的傳遞)

### Parameter
#### battery
| Parameter Name | Unit | Quantity | Description |
| -------------- | ---- | -------- | ----------- |
| Voltage | V | 7.2 ||
#### DC-DC
| Parameter Name | Unit | Quantity | Description |
| -------------- | ---- | -------- | ----------- |
| Winding Ratio | - | 7.2/7.2 ||
#### Motor
| Parameter Name | Unit | Quantity | Description |
| -------------- | ---- | -------- | ----------- |
| Maximun torque | N$$\ast$$m | 400 ||
| Maximun power | kW | 200 ||
| Torque Control Time Constant | s | 0.2 ||
| Motor and driver overall efficiency | % | 97 ||
| Speed at which efficiency is measured | rpm | 600 ||
| Torque at which efficiency is measured | N$$\ast$$m | 300 ||
| Thermal Port | - | Omit ||
#### Gearbox
| Parameter Name | Unit | Quantity | Description |
| -------------- | ---- | -------- | ----------- |
| Maximun torque | - | 400 ||
#### Differential
| Parameter Name | Unit | Quantity | Description |
| -------------- | ---- | -------- | ----------- |
| Maximun torque | - | 400 ||

### Reference
[1] [Vehicle Powertrain Simulation with Simscape Driveline](https://www.mathworks.com/videos/vehicle-powertrain-simulation-with-simscape-driveline-119545.html)
[2] [Physical Modeling Tutorial, Part 4: Powertrain Modeling](https://www.youtube.com/watch?v=SM5GcMph7oc)
[3] [Modeling a Vehicle Powertrain](https://www.mathworks.com/videos/modeling-a-vehicle-powertrain-68822.html)
[4] [Powertrain Simulation, Controls and Testing](https://www.speedgoat.com/solutions/industries/automotive/powertrain-simulation-controls-and-testing)
[5] []()



