## Multiple Types of Users Model (first version)

In this model, we start to dive into how pricing energy will affect the peak-to-average ratio (PAR). First, we consider different types of loads: base load, schedulable load, plug-in hybrid vehicle load, and distributed generation. The base load supplies the users with energy for their basic needs such as lighting and heating. Schedulable loads are for energy used for laundry-machines, dishwashers, etc. Plug-in hybrid vehicle loads are the loads required to charge PHEVs and must occur while the car is in the garage. Distributed generation loads are loads from solar or wind energy that can be sold back into the grid when the user has an excess.

We consider 4 different types of users.

Type 1: has both a PHEV and a distributed generator

Type 2: has a PHEV but no distributed generator

Type 3: has a distributed generator but no PHEV

Type 4: has neither a distributed generator nor a PHEV

We have calculated a pricing scheme and have been able to calculate the daily bill of users of each type. We have been using code written by Zhao to generate data for use in our model. We have done the optimization of the scheduling of the PHEV and schedulable loads for all types of users. We still need to implement the Distribution Generator into this model however, which we affect only our objective function.

Below are the plots we have generated. The one of the left shows how the bill of each customer is related to how much energy they use. The plot on the write shows our pricing scheme, which bases the cost at each hour off of the total energy used in that hour.

We consider 4 different types of users.

Type 1: has both a PHEV and a distributed generator

Type 2: has a PHEV but no distributed generator

Type 3: has a distributed generator but no PHEV

Type 4: has neither a distributed generator nor a PHEV

We have calculated a pricing scheme and have been able to calculate the daily bill of users of each type. We have been using code written by Zhao to generate data for use in our model. We have done the optimization of the scheduling of the PHEV and schedulable loads for all types of users. We still need to implement the Distribution Generator into this model however, which we affect only our objective function.

Below are the plots we have generated. The one of the left shows how the bill of each customer is related to how much energy they use. The plot on the write shows our pricing scheme, which bases the cost at each hour off of the total energy used in that hour.

After running our optimization using our first cost functions, we see that the Peak-to-Average ratio does decrease. This is the result of users shifting their loads to times when the price is lower. The figure below shows how the peak during hours 19 through 22 is lower and how the valley during hours 1 through 7 is being filled.

The figure on the left below shows an example of a user in the nonoptimal scheduling. The figure on the right shows the same user's energy requirements being met, just shifted to minimize the user's bill.

## PREVIOUS SIMPLIFIED MODELS

## One User Model

To understand how to do convex optimization in MATLAB, we created a very simple model of a smart grid . In this model, there was only one user who depended on the smart grid for energy. This user had a plug-in electric vehicle (PEV) that needed 5 kWh of energy to be fully charged. There was a maximum power level set for both hours of the simulation.

About this model:

2. The energy consumed per hour could not exceed the maximum power level for that hour (3.3 kWh/hour).

Note that the cost of energy was higher in the second hour. This led us to believe that we should expect to see the PEV charging at the maximum power level during the first hour, and then consume the remaining amount of energy needed in the second hour.

The results are shown to the left. As we expected, the car charged at maximum level in the first hour when the cost was lower. This means our intuition was correct, and we concluded our convex optimization in MATLAB worked correctly.

About this model:

- Simulation time: 2 hours
- Number of Smart Grid Users: 1 user
- Objective function: Minimize cost to user
- Constraints:

2. The energy consumed per hour could not exceed the maximum power level for that hour (3.3 kWh/hour).

Note that the cost of energy was higher in the second hour. This led us to believe that we should expect to see the PEV charging at the maximum power level during the first hour, and then consume the remaining amount of energy needed in the second hour.

The results are shown to the left. As we expected, the car charged at maximum level in the first hour when the cost was lower. This means our intuition was correct, and we concluded our convex optimization in MATLAB worked correctly.

## Two User Model

The purpose of creating this model was to gain a greater understanding of the relationships between the loads of each user in the smart grid, the cost of energy, and the bill of each user. In this model, there were two users that consumed energy from the smart grid. Each user had a base load (the energy required to sustain basic household functions) as well as a PEV load (the energy to required charge the user's PEV). The base load is fixed at each hour, while the PEV load depends on the scheduling of charging. For this model, the PEVs were both scheduled to charge in the first 6 hours of the simulation. By the end of the semester, we hope to figure out the optimal method for scheduling charging of PEVs such that the burden on the smart grid is minimized.

About this model:

The results of the simulation are shown in the figures below.

About this model:

- Simulation Time: 12 hours
- Number of Smart Grid Users: 2 users
- Purpose of model: to implement the relationships between the energy consumption of each user, the cost of electricity, and the bill of each user
- Cost of energy: Depends on the total amount of energy being consumed by smart grid users. The cost functions of each hour are quadratic functions dependent on the total energy consumed in that hour. These functions are increasing in total per-hour load and strictly convex.
- Bill of each user: The amount the user is billed in an hour is the cost of energy for that hour times the energy consumed by the user in that hour. The daily bill is simply the sum of these hourly bills.
- Load of each user: The PEV loads are not optimally scheduled. We decided that each user would charge its PEV in the first 6 hours of the simulation. The base loads of each user were randomly drawn from a uniform distribution of 1 to 5 kWh.

The results of the simulation are shown in the figures below.

As seen in the top two graphs, the cost of energy at each hour is related to the total energy consumed in that hour. The bottom two graphs show the proportional relationship between the energy consumed by each customer and the bill that the customer paid.