Welcome to using Industrial Communication
Toolbox in MATLAB.
In this video, you'll see how industries can use
PI system with this Toolbox.
So what does the PI System?
OSIsoft makes the PI System the market
leading data management platform for industrial operations.
PI System is an integrated portfolio of software
to collect, store, view, analyze,
and share operational data with users
within and beyond the enterprise.
And the heart of the system is the PI Server,
which is used for real-time data storage, normalization,
analytics, and notification engine.
Industrial Communication Toolbox allows
you to connect to an OSIsoft PI server
to extract the real-time data, normalize,
and analyze the data, all from within MATLAB.
There is a hydroplant owned by a company,
and they want to monitor the hydroturbines to ensure
optimal energy production.
They have a PI server set up that collects
real-time turbine-related data.
Now let's see how they can use Industrial Communication
Toolbox to help extract any turbine
data to monitor their performance and condition.
In this example, let's see how they can monitor and visualize
the line voltage data of the turbines.
In this example, the PI server is
named after the Windows computer in which
the server is installed.
So you can connect to the server,
using the piClient function and passing the hostname as input.
PI Server collects a lot of data and it's not
very easy to remember all the attributes or tags and the data
it stores.
To help narrow down a little bit,
there is a tags function that takes a partial tag name
and compares it with the available tags in the PI
Server.
So in this case, the turbine you want to monitor
is clear, but not the exact tag name of the attribute.
You can use the tags function to get the list of attributes
associated with that turbine by passing in the turbine name,
like so.
This is a new notation of using name value pairs in MATLAB
to make coding more streamlined.
From that big list, filter out the voltage tags
that you're interested in.
To read the data associated with the voltage line,
the read function takes in a date range,
along with the piClient object and the tags we
obtained in the previous steps.
Any date range can be given.
But if you're not sure when the data collection began,
passing the earliest equal to true name value
pair to the read function can be very helpful.
Now that you know the date/time of the first recorded entry,
your start date will look something like this.
And the end date can be set to now.
Typically, PI Server stores large amounts of data.
And depending upon how frequent the data collection
is, the size of the data can be huge.
It can be more than what MATLAB can handle, and is also
not very useful, either.
The PI System has a way of providing
interpolated data, which is more useful for analysis.
To do this, add the interval option to the read function.
This will extract data at 4-hour intervals.
Now that the data collection step is done,
let's visualize the individual voltage line data.
For that, unstack the timetable to distribute each line voltage
as a timetable variable.
Notice that the time table in the previous step
contains some NaN values.
This happens when data points of a timetable
are not all sampled at the same interval.
This can be corrected using linear interpolation,
using the Fill Missing function.
Create a separate timetable for each voltage line
which can be used for visualization in the next step.
This is how the visualization of the voltage line data
looks like.
So this is how a hydroplant can use Industrial Communication
Toolbox for monitoring various aspects of their turbines.
In this video, you have learned how to extract the tags
and read data related to them from the PI server,
using Industrial Communication Toolbox.
Thanks for watching.
Check out more examples in the documentation
to learn about other workflows.