Project-1: Modelling an electric Car with Li-ion battery
Li-ion with all its variants is the most used battery type today. It has a commanding 40% share among different battery types and this number is expected to grow even more because of increased use in EVs and consumer electronics.
One of the most actively discussed topics in the energy storage industry today is the solid-state Li-ion battery. It is a variant of Li-ion technology in which solid electrolytes are used instead of liquid/polymer electrolytes. Solid-state batteries offer some key advantages over conventional Li-ion. This includes a very high energy density, compact cell size between 3 and 4 microns (instead of 20 and 30microns), and a possibility of quick charging without the risk of dendrites formation. All this makes the technology lucrative for the automotive industry, which is looking for batteries that are able to withstand very high charging rates, thus reducing charging time for EV owners, and reduce space requirements in a car. This is the reason why some key manufacturers are already looking into using these batteries. BMW is considering the use of solid-state batteries for their newer models and Toyota is planning to produce vehicles with solid-state batteries by 2022. Going forward, these are the batteries that will be on our roads and parked in our garages in massive numbers.
But for now, I designed an EV vehicle that is powered by a Li-ion battery which is at its best when comes to performance.
Here we have connected a driving cycle source to run the system. Here we also configured the parameters accordingly for vehicle operation.

Here we control the vehicle with the help of a PID controller.

It is a command center to control our vehicle with necessary commands.

For simscape block connection considered in designing a vehicle, we connected H-Bridge with thermal port and controlled PWM voltage source for power supply to the vehicle.
Here at every stage current and voltage are measured to know the variation in parameter values, the output terminals of the H-Bridge are given to the DC motor connected after the charge controller.

The parameters for the PWM controller and H-bridge are applied as above.
SOC:
The state of charge for a battery is determined by this system which is very essential for a long run of a vehicle. The input for this block is fed from H-Bridge which is in series with the current sensor.

DC Motor:
Here we connected the DC motor with a thermal port(right-click on the block-->Simscape-->Block choices-->Show thermal port), and a gearbox with a fixed ratio of "5". The simscape block of the motor is connected with a Mechanical rotational reference block and temp sensor with Thermal reference block.


The DC motor is like a middle-ware between the charge controller and vehicle body which is the main source for working of the car.
Battery:
Here we configured a battery that resembles the LI-ion battery with the necessary parameters. Here from Demux, we are observing SOC, Current, Voltage.

Vehicle Body & Wheels:

The wheels in the body are connected to the motor for propulsion. A fixed gear is connected to the body for an electric vehicle.
Body parameters:
Here we also configured drag parameters in vehicle body frontal area-3, Drag coefficient-0.4, Air density-1.18 along with below parameters.

Now the mass and radius of the wheels are determined depends on the output required for the vehicle.

The velocity generated in the vehicle body block is fed back to the PID block to control the vehicle accordingly.
Here we are also calculating the distance traveled by the vehicle by below conversion.

Here we used some goto and from tags to sense the output signals from the system, precisely we are observing controller, motor temperature, and vehicle speed.

Above is the speed of the vehicle

Above are the controller and motor temperatures respectively.
After assembling all the components we discussed above, the model:

It starts from the drive cycle block and reaches to wheels, from where we are able to calculate the distance travelled.