## Lab 2: DCM Control - Part 2

### MATLAB Simulink LAB 1 file

Matlab v2018a or above is required to run this file. Click the link below to download the file.

#### Note - ملاحظة :

1. 1. عند تنزيل الملف تاكد من ان يكون اسم الملف خالي من الفراغات و الاقواس وعلامة الناقص
2. 2. احفظ الفايل في ملف جديد ويكون اسم الملف خالي من الفراغات و علامة الناقص
3. 3. "LAB1_HANDOUT_FILE_002v2.slx" تاكد من ان اسم الملف
4. 4. تاكد من ان اسم الملف الكامل لا يحتوي على فراغات او اقواس او علامة الناقص

### Step1: Measurements

1. Set $\alpha$ to be $30^o$
2. Create a table of initial measurements of $\alpha$, $\beta$, back EMF, $I_a$, $T$, and motor armature resistance and inductance.
3. Calculate the value of Z
4. Calculate the value of $K\phi$ from the torque equation.
5. Verify the value of $K\phi$ using the back EMF equation.
6. Calculate the percent error in $K\phi$. [error should not exceed 0.1%]

### Step 2: back EMF verification

Verify the mesured back EMF value by using the back EMF equation

$$E=\frac{V_{m}(\cos \alpha-\cos B)}{(\beta-\alpha)} -\frac{R_a I_a}{(\beta-\alpha)}$$

1. Calculate the percent error in E. If the error is larger than 2%, re-measure the angle $\beta$ so that the value of $V_a$ settles at the value of E and recalculagte the % error.

### Step 3: $\beta$ verification

Using the equation below, verify that the value of $\beta$ satisfies the equality. If there is discrepancy, adjust $\beta$ so that the equation is satisfied within 0.1% error margin.
$$0=\frac{V_m}{Z} \sin (\beta-\theta)-\frac{E}{R_a}+\left[\frac{E}{R_a}-\frac{V_m}{Z} \sin (\beta-\theta)\right]\cdot e^{-(\beta-\alpha)\cot(\theta)}$$

1. Using the new value of $\beta$, recalculate the back EMF.
2. Using the new value of $\beta$, calculate $\omega_m$ using the following equation and compare with the measurement value by calculating the percent error.

$$\omega_m=\frac{V_m(\cos \alpha-\cos \beta)}{k \phi(\beta-\alpha)}-\frac{T \cdot R_a\cdot \pi}{(K \phi)^{2}(\beta-\alpha)}$$

### Step 4: Conclusion

Write, in your own words (arabic or english) about the experience and challenges during this lab experiment. Highlight the strog concepts aquired and mention any weaknesses. Suggest any improvement.