Electric Two-Wheeler

The goal of the project is to design a controller for an alternator being used as a motor. As proof of concept, the entire system will be mounted on a bicycle to assess its performance in the rolling terrain of the Palouse.
=Problem Definition=
Design a motor controller that will test the limits of an alternator as a motor; compare its motor capabilities to its generator capabilities.
The first proof of concept is a DC generator load for fine control of steady state power output.
The second proof of concept is an Electric Vehicle load to test our controller under heavy transients.
=Specifications=
Alternators have good power density and cost-effectiveness as generators. These power values will give us the specifications for our performance standards when running our alternator as a motor. The controller design will have to be determined through capable modeling and experimentation.
However, the only initial requirement is that the system performs. That is, by any means available the controller should be able to start and reliably power the alternator under load. From here, we will be able to improve our design, bringing the performance values closer to those of the generator.
=Project Learning=
Implementation in c
Scheduling, fastest to slowest:
* PWM counter (〖𝑓𝑟𝑒𝑞〗_𝑠𝑤=80𝑀𝐻𝑧/(𝑐𝑜𝑢𝑛𝑡𝑠 𝑝𝑒𝑟 𝑑𝑢𝑡𝑦 𝑐𝑦𝑐𝑙𝑒))
* Space Vector PWM updater (𝑓𝑢𝑛𝑑𝑎𝑚𝑒𝑛𝑡𝑎𝑙/𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛)𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛=(𝑠𝑚𝑎𝑙𝑙𝑒𝑠𝑡 𝑠𝑡𝑒𝑝 𝑖𝑛 𝑑𝑒𝑔𝑟𝑒𝑒𝑠)/360Example: 50Hz fundamental (1500 RPM), 3 degree smallest step, 6 kHz updates
* Frequency updaterChange the fundamental frequencyChange the fundamental frequencyExample: 50 Hz to 60 Hz using a push-button
Fixed point multiplication
* Example: divide 50 by pi
* First, express 𝜋^(−1) as a multiple of 2^(−11)1/𝜋≅652∗2^(−11)50/𝜋≅50∗652∗2^(−11)=(50∗652)≫11=15.918Actual answer: 50/𝜋=15.9155Dividing by powers of 2 is simply a right shift
* Maximizing resolution16-bit architectureQ-number formatMoving the point to where as many fractional bits are assigned as possible but no more
=Final Design=
Picture	Info
Source: Microchip®, Sensorless Field Oriented control of a PMSM
 Source: Microchip®, Sensorless Field Oriented control of a PMSM	FOC in two minutes
*Control is actually quite simple 
*Objective: make rotor field orthogonal to stator field 
*AC machines are quite nonlinear if controlled in a stationary, three phase, reference frame 
*Some reference-frame shifting can yield not only steady state DC values but the dynamics are actually decoupled.
 	Data flow diagram
 	Space Vector Theory
*Not phasors: 
Phasors: Describe a single sinusoidal output, with the same frequency as the reference, but with variable magnitude and phase
SpaceVectors: Describes three sinusoidal output, all with the same phase relation, but with variable magnitude and position 
*Switching states: 
Each possible combination of the switching states is a unit vector in voltage space (for a voltage regulator) or current space (for a current regulator)
Using switching times to weight these states allows for precise control over the position of the three-phase signal
=Validation=
Method 	Result
Python SVM Simulation	67degrees 
 145degrees
MPLAB 	67degrees 
 145degrees
Oscilloscope 	67degrees 
 145degrees
Compare Three Methods	67degrees 
 145degrees
=Team Members=
 
Picture	Info
 	Vol_Wold
*Major: Elecrtical Engineering 
*Hometown: Coeur d'Alene, ID 
*Responsibility: Leader 
*Email: wold0156@vandals.uidaho.edu
 	Armando_Solis
*Major: Elecrtical Engineering 
*Hometown: Caldwell,ID
*Responsibility: Budgeter 
*Email: soli8592@vandals.uidaho.edu
 	Hai_Huang
*Major: Elecrtical Engineering
*Hometown: China
*Responsibility: Wikipage supervisor 
*Email: huan2458@vandals.uidaho.edu
=Additional Documentation=
Meeting Minutes
Tech Presentation
==Machine Test==
Picture	Name 	Description
 	Machine Test	Magnetization Curve Test
Procedure: Turn the machine at constant speed and record Ea as a function of If.
Results: gives data to the constant relationship between Ea and ω for all pre-saturation values of If.
Rotor and Stator Tests
Procedure: Place AC and DC on rotor or stator and use the resulting current outputs to determine Ls, Lr, Rs, and Rr.
==Simulation==
Picture	Name 	Description
 	simulink	Matlab, simulating different synchronous machines to observe date of machine. The purpose is to help us to build control system.
 	simulink	
* Rotating Space Vector
* Stationary Space Vector
 	simulink	
* Phases B and C should be shifted by -120 degrees and 120 degrees, respectively
* PWM is a form of frequency modulation, thus the fft of the PWM signal should resemble FM spectral characteristics
* If these yield the correct results, we can conclude that the SVM algorithm generates correct switching times
==Microcontroller==
Picture	Name 	Description
 	Microcontroller	Model: dSPIC33EV 
Application: Motor control via the PWM Module
Features:
16-Bit Architecture 
Pin Count: 28
Six Pulse-Width Modulation Outputs
==Snapshot==