Council Post: PID Control and its application in optimising digital marketing campaigns
Thanks to the recent advancements in technology, particularly in AI and machine learning, many researchers, scientists, AI engineers and innovators have expressed concerns that they may lose control over their creations, giving rise to what has come to be called the AI control problem. The control of both artificial as well as naturally occurring physio-chemical/biological systems is a critical requirement to achieve the desired goals for these systems. Let’s consider ‘cruise control for a car’ as an example. Here, the actual speed is recorded by the speedometer and is ‘fed-back’ and compared to the speed setting on the cruise control, which causes the engine to accelerate if the speed is too low. Other control systems can be seen in autonomous vehicles, autopilot mode in aeroplanes, anti-lock braking systems in vehicles, etc. In this article, we will learn about control systems and how these can be used to optimise digital marketing campaigns. But, before that, let us understand a few concepts. Control theory Control theory is an area of applied mathematics that focuses on the behaviour of dynamic systems by studying observability, controllability, stability, and optimality. Let us now understand these terms one by one: Observability: What all variables can we measure for a system? Observability is nothing but how well the internal states of a system can be inferred based on knowledge of its external outputs. In other words, you should be able to see what is happening inside the system under observation, or the system must be observable. Controllability: What all variables can be manipulated to move the system to the desired state? Controllability is critical in many control problems, including stabilising unstable systems by feedback or optimal control. In other words, you should be able to do whatever you want with the given dynamic system under control input, or the system must be controllable. Stability: How well can the system handle small perturbations? Stability means that the track does not change too much under small perturbations. Optimality: How can we keep the system under control with minimum cost? Optimality is the point where the difference between benefits and costs for a system is maximised. Proportional-Integral-Differential (PID) control One of the core building blocks in control theory is the concept of PID control. To understand how PID control works, let us start with some basic definitions: State Variable: Key variable(s) that define the (sub) system that needs to be controlledSet Point (SP): Desired value of the state variable(s) that could be static or dynamically changing over timeMeasured value (MV): Actual value of the state variable as measured at a point in time Error: Difference between SP & MV Control Variable: Key variable(s) that can be manipulated to move the system in the desired direction of minimising the error Given the above definitions, the PID control model determines how the Error term gets translated into the control variable as follows: Proportional (P) Control:  As the name suggests, the control variable is increased/decreased in direct linear proportion to the current level of the errorIntegral (I) Control: The error over a defined time is added up (integrated), and the control variable is increased/decreased based on this cumulative errorDifferential (D) Control: The rate of change of the error with respect to time is measured, and the control variable is increased/decreased based on this rate-of-change The control variable in the PID control system is determined by the combined effects of all three components. The balance between the three is determined through Tuning, which determines the optimal constants for the three terms in the control function. In addition to the integrated PID controller, we can also have proportional-integral (PI), proportional-differential (PD), purely proportional (P), etc., controllers that are more effective for a given system. Optimising digital marketing campaigns By their very nature, digital marketing or programmatic advertising campaigns are highly dynamic, real-time evolving systems. Programmatic advertising uses AI to automate ad buying and decide the target groups for your ad campaigns. Global digital ad spending is expected to increase by 15.2 per cent over the last year and reach $524.31 billion in 2022. According to Statista, programmatic advertising remains the leading approach for buying and selling digital ad space, with global programmatic ad spend reaching 82 per cent in 2022. Nearly 41 per cent of marketers say that AI and machine learning have had the most impact on their revenue growth and performance. So, how does the PID control approach apply in digital marketing? In a relatively simplified way, by applying the system definitions described above, we can view them as follows: State variable: The KPIs of the campaign – Impressions, views, clicks, CPA, CPC, etc. on a daily basis, daily budget availableSet point: The target number of impressions, views, clicks, CPA, CPC, etc., on a daily basis, a budget that needs to be consumed on a daily basis, etc.Measured value: Actual value of the impressions, views, clicks, CPA, CPC, etc. observed on a given day, actual budget consumed dailyError: Difference between the target & actual values of the state variablesControl variable: Bidding strategy Consequently, for a given campaign, by continuously measuring the error between the target and actual value(s) of the KPI(s) and formulating and tuning the PID control function, we can determine the optimal bidding strategy. For executing this approach on real campaigns, some nuances that need to be kept in mind include What is the right frequency at which the bidding strategy (control action) should be taken – should it be daily or more frequent than that? How does one translate the end-of-campaign KPI targets to intermediate set point targets?  How do you consider the interdependency of various KPIs so that optimising one doesn’t adversely impact others? Wrapping up This comes in handy; say, you want to make your website or app more responsive to the dynamic behaviour of the users. By applying these steps, you can optimise your marketing campaigns efficiently and seamlessly. This article is written by a member of the AIM Leaders Council. AIM Leaders Council is an invitation-only forum of senior executives in the Data Science and Analytics industry. To check if you are eligible for a membership, please fill out the form here.
AI engineers and innovators have expressed concerns that they may lose control over their creations, giving rise to what has come to be called the AI control problem.
AI engineers and innovators have expressed concerns that they may lose control over their creations, giving rise to what has come to be called the AI control problem. The control of both artificial as well as naturally occurring physio-chemical/biological systems is a critical requirement to achieve the desired goals for these systems. 
["digital marketing"]
["data science", "Go", "machine learning", "TPU", "AI", "ML", "Git", "digital marketing", "Aim", "analytics", "R"]
["AI", "machine learning", "ML", "data science", "analytics", "Aim", "TPU", "R", "Go", "Git"]
Anshuman is a data science leader with 20+ years of experience spanning both academia &amp; industry across multiple geographies. 

He is responsible for creating a horizontal data science and analytics practice and delivering strategic initiatives for the organization by building a global team of high caliber data scientists, formalizing and socializing data science delivery process and conceptualising &amp; creating innovative solutions leveraging ML, AI &amp; data science.