Provided there was Rule of Two in place, was Sidious going to replace Vader with Luke? Or, was there something else in his mind (like what he did with Darth Maul in Star Wars: The Clone Wars)?
Palpatine clearly wanted Luke to kill Vader in anger to complete his turn to the Dark Side. Just as Palpatine replaced an old and slower Darth Tyranus with a newer, younger apprentice, it is time to replace the old and crippled Vader with a young and whole Luke Skywalker to carry out Palpatine's bidding.
Killing Vader would be how Luke turned to the Dark Side. The Emperor and Vader didn't like each other. Vader resented Palpatine making Vader subject to Grand Moffs and bureaucrats, and he suspected that Palpatine intentionally gave him outdated armor to keep him weak. He may also have suspected that Palpatine wanted Obi Wan to dismember Anakin, because Anakin was the only Jedi who posed a potential threat to Palpatine - less limbs/organic tissue means less midichlorians. He may have borne a grudge about Padme's death as well.
Palpatine didn't like Vader because Vader's Force potential was severely depleted by his injuries. Palpatine felt that the years he had spent grooming Anakin were largely wasted, because Anakin lost so much Force potential due to his injuries.
Also, as we saw with Dooku, Sith have a nasty habit of turning on each other. What does Vader say to Luke immediately after the "I am your father" line? He says "Let's kill the Emperor and take his place". What did Anakin say to Padme in episode III? "Let's kill the Emperor and take his place". What did Palpatine say to Anakin as soon as Anakin had rendered Dooku less useful than Anakin? "Kill him". How did Darth Plagueis die? Killed by his apprentice. What does the Emperor say to Luke after Luke chops off Vader's hand? "Kill him and take his place".
From the Emperor's perspective, Luke was a second shot at all the benefits Anakin had offered without the limitations of being mangled and mostly robotic. From Vader's perspective, Luke was the perfect ally to overthrow the man who had led Anakin astray and subjected him to a life of pain, humiliation, and isolation.
Early drafts of the Return of the Jedi script make this very clear.
Vader and Jerjerrod arrive on Had Abbadon to meet with the Emperor. They go deep into the planet where the throne room is, overlooking a lake of fire. Vader and Jerjerrod kneel. the Emperor tells Vader that he’s been away too long, and his powers have gotten weak. Luke has become too powerful and must be destroyed. Vader tries to disagree, but is choked. Luke is the Emperor’s to destroy, and he dismisses Vader. Once gone, the Emperor tells Jerjerrod to look carefully at Vader. Luke will NOT be destroyed, but will be turned into a new Dark Lord.
Revised Rough Draft:
Vader demands to know why the Emperor has not responded to any of Vader’s transmissions. Jerjerrod evades the question, but Vader insists on an answer and a reason for his orders to return home. Jerjerrod tells Vader the the Emperor is disturbed that Vader failed to bring Skywalker to the Emperor and has decided to take charge of the matter personally. Vader will now supervise the construction of the two Death Stars. Vader is furious, but Jerjerrod explains that the Emperor believe he still has feelings for his son that are getting into the way. In the communication chamber, Jerjerrod kneels before an image of the Emperor who demands that Skywalker be brought to him. Vader must not know anything of this conversation. Jerjerrod suggest that the upcoming Rebel battle will distract Vader from Luke long enough to bring Luke to the Emperor. Vader kills Jerjerrod when he finds that Luke has been taken to the Emperor. Vader goes to meet the Emperor. He is stopped by two guards, whom he kills. Vader demands to know wher eLuke is, and the Emperor chokes him. The Emperor says Vader’s place is with the fleet, and Luke is the Emperor’s to train. Vader asks for forgiveness and leaves.
The official script for Revenge of the Sith also displays Vader's hatred of Palpatine. In the finished movie, immediately after Palpatine tells Vader that Padme is dead, Vader freaks out and uses the Force to destroy the operating room and everything in it except Palpatine. In the script, however, Vader flings all the stuff in the room at Palpatine:
DARTH VADER SCREAMS, breaks his bonds to the table, and steps forward, waving his hands, causing objects to fly around the room. SIDIOUS deflects the objects, but some of the DROIDS aren’t so lucky. VADER’S PAINFUL SCREAMS echo throughout the Center.
Wookiepedia has much, much more along these lines:
Even as he made his way to the body, Sidious wrestled with anger and indecision. Part of him wanted to leave what was left of Vader to burn to ashes in the rising lava for his failure. As he walked however, he reasoned that, after having spent almost twenty years in preparation for turning Vader, to let him die would be a waste.
Though he had nearly left Vader to die back on Mustafar, Sidious held, perhaps, the merest sliver of affection for him that he had never held for Maul or Tyranus. The reason for this may lie in Vader's one-of-a-kind potential. To find another being even half as powerful could take many years, and even then it would probably never happen.
Back in the capital, at the Emperor Palpatine Surgical Reconstruction Center, Palpatine commanded that Vader be rebuilt using prosthetic replacements, a long and painful process that Palpatine made sure Vader would be kept conscious for, in order to make him stronger through pain. Upon being completely rebuilt and outfitted in a life-supporting suit of armor, Vader asked his master what had become of Padmé. How much of the story Palpatine knew is unknown, but he apparently believed Vader himself had killed his wife in his anger, which worked to his own advantage by breaking Anakin Skywalker's spirit once and for all; Anakin's transformation to Vader was now fully complete. Vader fell into a rage and destroyed the operating theater, and even attempted to reach out and kill Sidious. However, he proved unable to do so; his injuries had reduced his power in the Force as they had his physical capabilities, and would need to be similarly rebuilt. His knee-jerk reaction having failed to destroy Palpatine, Vader quickly ceased his efforts, realizing that Palpatine was all he had left; the only one who would accept him. Palpatine was pleased: one of the most powerful Sith Lords of all time was born in pain and suffering, and it was his apprentice.
Per Sith tradition, Sidious was fully aware of Vader's desire for an apprentice to help him overthrow the current regime. Although the Emperor was left unaware of Vader's failure at retrieving the Muur Talisman, he nonetheless arranged for Vader to be sent to Bandomeer to crush a rebellion on the mining planet. The Emperor, sometime after his making Vader his apprentice, secretly issued a contingency order to the stormtroopers, according to which, should he give the order, they would turn their blasters on Vader. About three months and three weeks of Imperial rule, during the Battle of Bandomeer, Lord Vader asked Commander Vill of the 501st whether such an order had been issued. Receiving no reply, Vader killed the Commander.
"You have forgotten your place, Lord Vader. By taking this boy as your apprentice, you have betrayed me. Now you will kill him, or I will destroy you both." ―Palpatine ordering Vader to "kill" Starkiller.
In time, the Emperor became aware of Vader's training of Galen Marek as his secret apprentice. While initially angry at Vader for this, he used it to his advantage - in both uncovering the treacherous members of the Imperial Senate rumored to be trying to start rebellion against the Empire and as an opportunity to finally dispose of Vader. Ever since the setback on Mustafar, Palpatine was disappointed to see his apprentice wither away into a broken shell of the man he once was. Palpatine had spent years engineering Anakin Skywalker's fall to the dark side, only to see his life's work all but destroyed because of Vader's carelessness. But with Starkiller now in his plans, he sent his spies to follow him on his missions for Vader. With the reports he received, he was thrilled with the prospect of taking the young Sith hopeful as his own apprentice.
After completing his final mission by killing Shaak Ti of the former Jedi Council on Felucia, Starkiller returned to his master's flagship, the Executor where he believed they would assassinate the Emperor together. Unknown to Starkiller, however, Palpatine's spies had been tracking him since his victory over the exiled Aleena Jedi Master, Kazdan Paratus, on Raxus Prime. When Starkiller arrived on the incomplete Executor, the Emperor utilized a holodroid to project an image of himself to reprimand Vader, just in case Vader decided to go through with his plan. With the element of surprise lost to them, Vader was forced to "betray" his apprentice after the Emperor threatened to destroy them both unless Vader complied. As Starkiller stared at his master in shock, the Emperor angrily commanded Vader to kill the secret apprentice. Though he hesitated for a brief moment, Vader used the Force to assault Starkiller before launching him out of the bridge's observation window. Palpatine, likewise, expressed sadistic amusement at Vader's assault, even laughing to himself in private after the deed was done.
From the page on Vader:
Aware that he could not bring down Palpatine and become the new Sith Master on his own, Vader began a covert search for an apprentice, or something that could increase his own power. Eventually, he started trailing an ancient Sith artifact known as the Muur Talisman.
With Shaak Ti's death, the last of Starkiller's trials had been completed. Darth Vader recalled his apprentice back to Executor, where Vader assured Starkiller that they would finally kill Emperor Palpatine and rule the galaxy together as Master and Apprentice.
Afterward, Vader informed the apprentice of the extent of his successful mission, claiming that Palpatine was greatly displeased at the events on Raxus Prime. Starkiller advised that he could not maintain communications with Vader for the time being, mainly so that the Rebels would not suspect his identity or his past under Vader, which could potentially undo all that he had accomplished in forming the Rebellion. Although Vader initially intended to betray Palpatine with his apprentice at his side, for unknown reasons he later changed his mind and made other plans.
As Vader met up once more with a suspiciously unsurprised Palpatine, the badly damaged Dark Lord could not help but suspect that the encounter was yet another test. The distrust between mentor and student, fed by years of such trials, grew.
After Padmé's death and his duel on Mustafar, Vader's relationship with the Emperor became an unusual and complicated one. Vader resented Sidious for essentially creating him and mentioned on numerous occasions that he intended to kill the Dark Lord and take his place. On the other hand however, Vader passed up numerous opportunities over the years to either kill Sidious or allow him to die. Lumiya, one of Vader's apprentices, would later describe Sidious as Vader's "only link to the world of the living" after Padmé's death. This essentially implied that, while part of Vader hated his Master, he was also the closest thing Vader had to a friend during his tenure as a Sith Lord.
Budgetary limitations and lack of effective equipment imposed by the Empire also acted as a factor to the shoddy attempts at repair, with DD-13/HK also speculating that the limitations may have been deliberately orchestrated by the Emperor in order to ensure Vader didn't rebel.
On one occasion early on in Vader's career as a Sith, Palpatine threatened to use Force lightning against him when Vader expressed displeasure with a dressing-down Palpatine was giving him. Palpatine revealed on that occasion that he was well aware that the delicate circuitry that allowed Vader's life support systems to function was vulnerable to electrical discharges. Vader would later outfit his armor with electrical insulation.
From Lucas himself:
"Anakin, as Skywalker, as a human being, was going to be extremely powerful,” he says. "But he ended up losing his legs and an arm and became partly a robot. So a lot of his ability to use the Force, a lot of his powers, are curbed at this point, because, as a living form, there’s not that much of him left. So his ability to be twice as good as the Emperor disappeared, and now he’s maybe 20 percent less than him. So that isn’t what the Emperor had in mind. He wanted this really super guy, but that got derailed by Obi-Wan. So he finds that, with Luke, he can get a more primo version if he can turn Luke to the Dark Side. You’ll see, as this goes on, Luke is faced with the same issues and practically the same scenes that Anakin is faced with. Anakin says yes and Luke says no." ―George Lucas
Palpatine clearly intended to replace Vader with Luke, and his intention was for Luke to kill Vader as the mechanism by which Luke was seduced to the dark side. After Luke defeated Vader (chopped off his hand), the Emperor exhorted Luke to kill Vader and take his place:
Good! Your hate has made you powerful. Now, fulfill your destiny and take your father's place at my side!