user88244: Error
Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"

AnalogInOutSerial:8:56: error: no matching function for call to 'PID::PID(int*, int*, double*, double&, double&, double&, int)'
 PID pid(&Rawval, &Rawval, &setpoint, kp, ki, kd, DIRECT);
                                                        ^
In file included from C:\Users\USER\AppData\Local\Temp\arduino_modified_sketch_407168\AnalogInOutSerial.ino:1:0:
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:24:5: note: candidate: PID::PID(double*, double*, double*, double, double, double, int)
     PID(double*, double*, double*,        // * constructor.  links the PID to the Input, Output, and
     ^~~
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:24:5: note:   no known conversion for argument 1 from 'int*' to 'double*'
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:20:5: note: candidate: PID::PID(double*, double*, double*, double, double, double, int, int)
     PID(double*, double*, double*,        // * constructor.  links the PID to the Input, Output, and
     ^~~
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:20:5: note:   candidate expects 8 arguments, 7 provided
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note: candidate: constexpr PID::PID(const PID&)
 class PID
       ^~~
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note:   candidate expects 1 argument, 7 provided
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note: candidate: constexpr PID::PID(PID&&)
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note:   candidate expects 1 argument, 7 provided
exit status 1
no matching function for call to 'PID::PID(int*, int*, double*, double&, double&, double&, int)'


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Actual Code
#include <PID_v1.h>

int analogPin = A3; 
int Rawval ;  // variable to store the value read
double setpoint = 169; // target value for the system is set to 169
double kp = 1, ki = 0.1, kd = 0.01; // PID constants
int RELAY_pin = 10;    // Relay is connected to pin D10
PID pid(&Rawval, &Rawval, &setpoint, kp, ki, kd, DIRECT);

void setup()
{
  Serial.begin(9600);           //  setup serial
  pinMode(RELAY_pin, OUTPUT);
  pid.SetMode(AUTOMATIC);
}

void loop()
{
  Rawval = analogRead(analogPin);
  Serial.print("Rawvalue from Analog input  =");
  Serial.println(Rawval);
  pid.Compute();
  digitalWrite(RELAY_pin, Rawval < setpoint ? HIGH : LOW); 
}


user87849: The first two parameters need to be of type double.
PID pid(&Rawval, &Rawval, &setpoint, kp, ki, kd, DIRECT);
        ^^^^^^^  ^^^^^^^

It also makes probably no sense to have input and output both wired to &Rawval.
Take a look on this example.

user60431: The error message is quite clear about the problem (extracted and formatted for clarity):

no matching function for call to
PID::PID(int*, int*, double*, double&, double&, double&, int)
[...]
candidate:
PID::PID(double*, double*, double*, double, double, double, int)
[...]
no known conversion for argument 1 from 'int*' to 'double*'
[other candidates left out due to non-matching number of arguments]

You need to provide pointers to double as the first two arguments, and the candidate will match.

EDIT:
I hesitated a while to provide your this, because you learn much better by doing it yourself. Anyway, here it is.
Your original variable declaration is:
int Rawval ;  // variable to store the value read

Replace the data type int by double, as the called constructor expects:
double Rawval ;  // variable to store the value read

Now there is this line, assigning an int to a double:
Rawval = analogRead(analogPin);

And you might ask yourself, is this OK? Well, try it. You will find that the compiler implicitly converts the value. If you want to make it explicitly, change the line to:
Rawval = static_cast<double>(analogRead(analogPin));

A final point, as datenheim states: Read and learn about the PID. It is for sure an error to use the same variable for input and output.

88244: <h4>Error</h4>
<pre><code>Arduino: 1.8.19 (Windows 10), Board: &quot;Arduino Uno&quot;

AnalogInOutSerial:8:56: error: no matching function for call to 'PID::PID(int*, int*, double*, double&amp;, double&amp;, double&amp;, int)'
 PID pid(&amp;Rawval, &amp;Rawval, &amp;setpoint, kp, ki, kd, DIRECT);
                                                        ^
In file included from C:\Users\USER\AppData\Local\Temp\arduino_modified_sketch_407168\AnalogInOutSerial.ino:1:0:
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:24:5: note: candidate: PID::PID(double*, double*, double*, double, double, double, int)
     PID(double*, double*, double*,        // * constructor.  links the PID to the Input, Output, and
     ^~~
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:24:5: note:   no known conversion for argument 1 from 'int*' to 'double*'
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:20:5: note: candidate: PID::PID(double*, double*, double*, double, double, double, int, int)
     PID(double*, double*, double*,        // * constructor.  links the PID to the Input, Output, and
     ^~~
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:20:5: note:   candidate expects 8 arguments, 7 provided
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note: candidate: constexpr PID::PID(const PID&amp;)
 class PID
       ^~~
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note:   candidate expects 1 argument, 7 provided
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note: candidate: constexpr PID::PID(PID&amp;&amp;)
C:\Users\USER\Documents\Arduino\libraries\Arduino-PID-Library-master/PID_v1.h:5:7: note:   candidate expects 1 argument, 7 provided
exit status 1
no matching function for call to 'PID::PID(int*, int*, double*, double&amp;, double&amp;, double&amp;, int)'


This report would have more information with
&quot;Show verbose output during compilation&quot;
option enabled in File -&gt; Preferences.
</code></pre>
<h4>Actual Code</h4>
<pre class="lang-cpp prettyprint-override"><code>#include &lt;PID_v1.h&gt;

int analogPin = A3; 
int Rawval ;  // variable to store the value read
double setpoint = 169; // target value for the system is set to 169
double kp = 1, ki = 0.1, kd = 0.01; // PID constants
int RELAY_pin = 10;    // Relay is connected to pin D10
PID pid(&amp;Rawval, &amp;Rawval, &amp;setpoint, kp, ki, kd, DIRECT);

void setup()
{
  Serial.begin(9600);           //  setup serial
  pinMode(RELAY_pin, OUTPUT);
  pid.SetMode(AUTOMATIC);
}

void loop()
{
  Rawval = analogRead(analogPin);
  Serial.print(&quot;Rawvalue from Analog input  =&quot;);
  Serial.println(Rawval);
  pid.Compute();
  digitalWrite(RELAY_pin, Rawval &lt; setpoint ? HIGH : LOW); 
}
</code></pre>
 87849: <p>The first two parameters need to be of type double.</p>
<pre><code>PID pid(&amp;Rawval, &amp;Rawval, &amp;setpoint, kp, ki, kd, DIRECT);
        ^^^^^^^  ^^^^^^^
</code></pre>
<p>It also makes probably no sense to have input and output both wired to &amp;Rawval.</p>
<p>Take a look <a href="https://arduino.stackexchange.com/q/24652/87849">on this example.</a></p>
 60431: <p>The error message is quite clear about the problem (extracted and formatted for clarity):</p>
<blockquote>
<p>no matching function for call to<br />
<code>PID::PID(int*, int*, double*, double&amp;, double&amp;, double&amp;, int)</code><br />
<em>[...]</em><br />
candidate:<br />
<code>PID::PID(double*, double*, double*, double, double, double, int)</code><br />
<em>[...]</em><br />
no known conversion for argument 1 from '<code>int*</code>' to '<code>double*</code>'<br />
<em>[other candidates left out due to non-matching number of arguments]</em></p>
</blockquote>
<p>You need to provide pointers to <code>double</code> as the first two arguments, and the candidate will match.</p>
<hr />
<p><strong>EDIT:</strong></p>
<p>I hesitated a while to provide your this, because you learn much better by doing it yourself. Anyway, here it is.</p>
<p>Your original variable declaration is:</p>
<pre class="lang-cpp prettyprint-override"><code>int Rawval ;  // variable to store the value read
</code></pre>
<p>Replace the data type <code>int</code> by <code>double</code>, as the called constructor expects:</p>
<pre class="lang-cpp prettyprint-override"><code>double Rawval ;  // variable to store the value read
</code></pre>
<p>Now there is this line, assigning an <code>int</code> to a <code>double</code>:</p>
<pre class="lang-cpp prettyprint-override"><code>Rawval = analogRead(analogPin);
</code></pre>
<p>And you might ask yourself, is this OK? Well, try it. You will find that the compiler implicitly converts the value. If you want to make it explicitly, change the line to:</p>
<pre class="lang-cpp prettyprint-override"><code>Rawval = static_cast&lt;double&gt;(analogRead(analogPin));
</code></pre>
<p>A final point, as datenheim states: Read and learn about the <code>PID</code>. It is for sure an error to use the <em>same variable</em> for input and output.</p>
