SAS Analytics for IoT

7月 262019
 

In a previous post, Zero to SAS in 60 Seconds- SAS Machine Learning on SAS Analytics Cloud, I documented my experience with a SAS free trial on the SAS Analytics Cloud. Well, the engineers at SAS have been busy and created another free trial. The new trial covers SAS Event Stream Processing (ESP).

This time last year (when just starting at SAS), I only knew ESP as extrasensory perception. I'm more enlightened now. Working through this exercise introduced me to how event stream processing is a powerful and effective tool for analyzing data using machine learning and streaming analytics to uncover insights for real-time decision making. In a nutshell, you create a model, stream your data, process the results, and make timely decisions based on the results.

The trial uses SAS ESPPy, allowing you to embed an ESP project inside a Python pipeline. To see ESPPy in action take a look at this video. To learn more about ESP and IoT see this article on the SAS Communities Library. In this article I chronicle my journey through the trial while introducing key concepts and operations of ESP.

Register and get started

The process to register and initial login are identical to the machine learning article. You must have a SAS Profile to participate in the trial. The only difference is you need to follow this link to sign up for the ESP trial. Please refer to the machine learning article for detailed steps of signing up and logging in.

The use case

SAS Solar Farm in Cary

The SAS Solar Farm sits on almost 12 acres of SAS Headquarters property. There are 10,276 solar panels producing more than 3.6 million kilowatt hours annually. That’s enough power for more than 325 average sized U.S. homes.

As part of the environment management, it is important to continuously monitor the operation of the solar panels to optimize configuration parameters, detect potential equipment failure, and accurately forecast the amount of energy generated. Factors considered include panel angles, time of day, seasons, and weather patterns as the energy generated depends directly of the amount of sun available to the panels.

The ESP project in this demo is pre-loaded in the trial and is run through a Jupyter notebook. The project shows the monitoring of energy (kWh) and power (kW) generated during a specific time interval eliminating localized outlier effects and triggering alerts when there is a pre-defined difference in the energy generated between subsequent time intervals.

Solar Farm Data represented as digital art

Take two minutes and watch this video on how SAS uses SAS software to create a work of art with solar farm data.

Disclaimer: no sheep were harmed during data collection or writing of this article.

Navigating the trial

Once logged into the trial, you see the Applications screen.

ESP trial Applications screen

The Data and Team options in the left pane behave exactly as those in the machine learning trial. These sections allow you to access data and manage a multi-user system. Select the SAS Event Stream Processing icon to start a JupyterLab session.

JupyterLab home screen

I will not go into the details of JupyterLab here. The left pane contains menus, file management, and other options. The pane on the right displays three options:

Python 3 Notebook - a blank Jupyter notebook - documents that combine live, runnable code with narrative text (Markdown), equations (LaTeX), images, interactive visualizations and other rich output
Python 3 Console - a blank Python console - code consoles enable you to run code interactively in a kernel
Text File - basic text editor - enables you to edit text files in JupyterLab

For this article we're going to follow along and interact with the pre-loaded demo Solar Farm ESP project. To locate the Jupyter notebook double click the demo directory from the left pane.

Select the demo directory from the left pane

Next select Event_Stream_Processing. Before proceeding with the demo, I'd highly suggest opening the README.ipynb file.

Contents of the README notebook

Here you will find overview and environment organization information for the trial. The trial uses SAS ESPPy for designing, testing, and deploying projects on ESP Servers.

Step through the demo

Before starting the trial, I needed a little background on event stream processing. I located the SAS ESP product documentation. I recommend referring to it for details on the ESP model, objects, and workflow.

To access the demo, double click the demo directory from the left pane. The trial comes with five pre-loaded demos. Feel free to try any/all of them. Double click on ESP Basic Project - Solar Farm.ipynb to display the Solar Farm notebook. The notebook walks you through the ESP model creation and execution. To run a command place the cursor in a command cell and select the 'Run' button (triangle-shaped button at the top of the notebook). If no response returns when running the cell block, assume the commands ran successfully.

Below is a brief description of the steps in the project:

  1. Create the project and query used - this creates dedicated space and objects where the ESP process takes place
  2. Create input and aggregate windows - this action extracts desired data and creates data subsets from the stream
  3. Add a join window - this brings together lag and current values into the project
  4. Add a compute window - this calculates the difference between the previous and current event
  5. Add a filter window - this action filters occurrences outside a threshold value; this creates an alert for potential mechanical issues
  6. Define workflow connections - this defines the workflow between the various windows in the project
  7. Save the project - this generates an XML file for the project
  8. Load the project to the ESP Server - this loads the project and produces a graphical representation of the workflow

    Solar Farm project workflow

  9. Start streaming data - in this example, rather than streaming data in real time, the stream derives from the solar farm table data
  10. View solar farm data - this creates a graphical representation of streaming data

    Solar Farm graph for kW and kWh

While not included in the demo, the streaming data would pass through the filter and if a threshold breach occurs, an alert is created. Considering the graph above, alerts could very well have occurred just before 1:15 pm (IntkW drops from 185 to 150) and just before 2:30 pm (IntkW drops from 125 to 35).

Your turn

Now that you have a taste of ESP, feel free to step through the rest of the demos. You may also load your own data and create your own ESP models. Feel free to share your experience and what you create by leaving a comment.

SAS Event Stream Processing on SAS Analytics Cloud - my journey was published on SAS Users.

4月 222016
 

SAS Global ForumImpressive innovations and exciting announcements took center stage (literally) at Opening Session of SAS Global Forum 2016. Near the end of the session, SAS CEO Jim Goodnight shared news about SAS’ new architecture that had everyone abuzz.

SAS® Viya™ - There’s a new headliner in Vegas

“We are unveiling a quantum leap forward in making analytics easier to use and accessible to everyone,” Goodnight said. “It’s a major breakthrough and it’s called SAS Viya.”

Goodnight was also quick to point out that SAS Viya will work with customers’ existing SAS 9 software.

Goodnight invited Vice President of Analytic Server Research and Development Oliver Schabenberger, who led the development work for SAS Viya, to join him on stage to discuss the new cloud-based analytic and data management architecture.

Jim Goodnight makes some exciting announcements at SAS Global Forum 2016 Opening Session

Jim Goodnight shares exciting announcements at SAS Global Forum 2016 Opening Session

“We see great diversity in the ways our customers approach and consume analytics,” Schabenberger explained. “From small data to big data. From simple analytics to the toughest machine learning problems. Data in motion and data at rest. Structured and unstructured data. Single users and hundreds of concurrent users. In the cloud and on premises. Data scientists and business users.”

SAS has developed a truly unified and integrated modern environment that everyone can use, whether you are a data scientist or a business analyst. “The beauty of SAS Viya is that it’s unified, open, simple and powerful, and built for the cloud,” said Schabenberger. “Today we are moving to a multi-cloud architecture.”

Goodnight encouraged customers to be “sure to try it out. I think you will enjoy the new SAS Viya.”

The SAS Viya procedural interface will be available to early adopters in 30 days, with visual interfaces scheduled for a September release. Customers can apply to be part of the SAS Viya early preview program.

SAS Customer Intelligence 360 and SAS Analytics for IoT announced

SAS Viya wasn’t the only “star” of the evening.

Goodnight lauded the company’s continuing efforts to globalize and expand ways to make our software faster and easier to use. On the development side, he highlighted SAS Customer Intelligence 360, SAS® Forecast Studio, SAS® Event Stream Processing, SAS® Cybersecurity and the next generation of high performance analytics.

Executive Vice President and SAS Chief Revenue Officer Carl Farrell took the stage to share examples of the many diverse uses of SAS. “Today, our customers are so much more educated on big data and analytics,” Farrell said. “CEOs are realizing that analytics can help them draw more value for their business around that data.”

Farrell singled out several customers including Idea Cellular Ltd. in India, which is processing a billion transactions a day -- something that was impossible before high performance analytics – and Macy’s customer intelligence project that is focused on making real-time offers to customers as they walk through a store, creating a personal and immediate experience.

Farrell also said he was so proud of the SAS work being done outside of business, in the data for good realm, specifically mentioning work in Chile combatting the Zika virus and the work of the Black Dog Institute, which conducts research to improve the lives of people with mental illness.

“Our customers are doing amazing things with SAS that we couldn’t have imagined 40 years ago, and this is just the tip of the iceberg and there’s so much more to come,” Farrell said.

Jeromey Farmer accepts the 2016 User Feedback Award from Annette Harris.

Jeromey Farmer accepts the 2016 User Feedback Award from Annette Harris,

Speaking of stars, Senior Vice President of Technical Support Annette Harris applauded the SAS Super Users for their work in support communities. “SAS users have a rich tradition of helping each other in peer-to-peer forums,” said Harris.

Harris also recognized the 2016 SAS User Feedback Award winner, Jeromey Farmer, a Treasury Officer from the Federal Reserve Bank of St. Louis, noting that SAS gained strong insights from Farmer into how SAS can more seamlessly integrate in a complex and secure environment.

SAS Executive Vice President and Chief Marketing Officer Randy Guard took the stage to announce SAS® Analytics for IoT and to talk about some macro trends he is seeing, including the digital transformation taking place in business and technology. He cited an IDC report that stated by the end of 2017, two-thirds of all CEOs will have digital transformation – across their company – at the top of their agenda.

Customers want help in managing their data, including streaming data, and want analytics embedded in their applications, he added. He calls the latter “analytics any way you want it.”

Customers also want software as a service, including self-service, and want to know how to monetize the connectivity and continuous load of data. “That hits our sweet spot in analytics at SAS,” he said. “The transformation is under way and we are investing money to make this transition smoother for our customers.”

40 and Forward

Woven throughout Opening Session were references to SAS’ 40 years in business.

Asked about what has changed over the years, Goodnight recalled that when SAS started, there was one product on a single machine. Now we have more than 200 products on dozens of machines. Back then, a computer could process about 500 instructions a second. Now it’s up to 2 to 3 billion instructions a second. The very first disk drives were two feet across, with tapes containing about five million bytes. Now we can get 1.2 terabytes in the size of a K-cup.

As for key milestones over the 40 years, Goodnight said two things came to mind. One was the introduction of multivendor architecture in the mid-1980s so our software could run on all platforms, and the other was the advent of massively parallel computing.

Not surprisingly, given the milestone anniversary year for SAS, the Opening Session ended with a video retrospective looking back on world news from the 1970s through today, with a cameo appearance by Goodnight from the early days of SAS.

If you want to view a recording of Opening Session, visit the SAS Global Forum Video Portal.

tags: SAS Analytics for IoT, SAS Customer Intelligence 360, SAS Global Forum, SAS Viya

Highlights from SAS Global Forum: Opening Session was published on SAS Users.